My .htaccess file has the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
From what I understand, that should be correct. The WordPress site was listing this as the correct setting.
For functions, the only that could affect me would be this one:
function get_all_posts_mp($query)
{
if(is_home() && $query->is_main_query())
{
$query->set('post_type', array('events')); // add custom post types into the array
$query->set('posts_per_page', 4);
}
}
add_filter('pre_get_posts', 'get_all_posts_mp');
That code should only affect the main/index page of the site. Even if I remove that code, the page menu item still won’t work for me.
The .htaccess file is being used because if I make modifications to it, I can see them happening with my site.
I display my menu with the following code:
<?php
$menu_code = wp_nav_menu(array('echo' => false));
$menu_code = str_replace(array("\n"), "", $menu_code);
print($menu_code);
?>
That code prints out the following:
<div class="menu-main-container">
<ul id="menu-main" class="menu">
<li id="menu-item-65" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-home menu-item-65">Home
<li id="menu-item-66" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-66">Events
<li id="menu-item-223" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-223">Contact
</div>