Hide Drafted Pages in menus

add_filter(‘wp_get_nav_menu_items’, function ($items) { // Frontend only if (is_admin()) { return $items; } foreach ($items as $key => $item) { if ($item->object !== ‘page’) { continue; } if (get_post_status($item->object_id) !== ‘publish’) { unset($items[$key]); } } return $items; }, 10);Continue reading

Dream Home

Dream Home – a home built around the light Dream HomeBook a viewing The house that follows the light. Three bedrooms, 2,000 sq ft of carpet area, an 18-metre pool and 1.4 acres of olive grove above the Ojai Valley.…Continue reading

Disable Random Content Redirects

// Turn off the random content redirects added in WordPress 7.2 (/random/, /random/category/news/, ?random). add_filter( ‘wp_enable_random_content_redirect’, ‘__return_false’ ); // The /random/ URLs are stored rewrite rules, so rebuild them once if any are still there. add_action( ‘init’, function () {…Continue reading

Export Snippets From the Snippets List

add_filter( ‘wpcode_code_snippets_row_actions’, function ( $actions, $snippet, $view ) { if ( ‘trash’ === $view || ! current_user_can( ‘wpcode_edit_php_snippets’ ) ) { return $actions; } $url = wp_nonce_url( add_query_arg( array( ‘page’ => ‘wpcode’, ‘action’ => ‘export’, ‘snippet_id’ => absint( $snippet->ID ),…Continue reading

Five Nights at Freddy’s

FNAF (Five Nights at Freddy’s) transforms this unusual job into a frightening test of patience, observation, and survival. Strange movements, unexpected noises, and limited resources make every night increasingly stressful. Can you survive until morning without becoming their next victim?…Continue reading