0

I ran some checks on RAM on my machine and discovered this error "Error: (06/14/2020 12:45:54 PM) (Source: MariaDB) (User: ) Description: mysqld.exe: Table '.\test\wp_usermeta' is marked as crashed and should be repaired"

I have local WP install on localhost. Does this error somehow impact the fact that I am unable to stop auto add of new pages to primary menu even if I have 'Automatically add new top-level pages to this menu' unchecked?

EDITS:

function.php child theme

   function archive_menu() {
      register_nav_menu('archive_menu',__( 'Archive' ));
    }
    add_action( 'init', 'archive_menu' );

index.php child theme

<?php
  wp_nav_menu(
    array ( 'theme_location'=> 'archive_menu')
);?>
0

I can't see how, because the wp_usermeta table contains the metadata about your users. The menu items are stored in the wp_posts table, and the menu options (including the status of the "Automatically add new top-level pages") is stored in wp_options.

I would definitely recommend that you repair the crashed table, though, because it's likely having an impact on your WordPress site. See this question and its answers for advice.

Edit

Your posted code looks right to me, and if you've assigned the menu properly then it should be working. I'm not sure what the problem might be. Does the menu work properly in a default theme?

7
  • Thanks @Pat J. I will definietely check the link you gave me. I know this is a different question but can you also give me some advice on how to stop new pages automatically added to primary menu and only add them to custom menu? I am using a child theme where I created custom menu but when I add new page it gets added to both menus - primary and my custom one. I read few articles on Codex on how to create menus including custom one but none of them addresses my scenario – 810311 Jun 16 '20 at 3:27
  • 1
    I'm not sure. Have you assigned your custom menus to a theme menu location? If not, the menu location might be using the WordPress default behaviour, which is "list all the pages". See here. – Pat J Jun 16 '20 at 18:44
  • Yes, I did. I used register_nav_menu in my child theme to register new location, then I created new menu and assigned to that location, then I called that menu in my index.php with wp_nav_menu. I read that link you gave me before on how to create menus.Still can't figure it out. How can I turn off "list all the pages" in child theme? – 810311 Jun 17 '20 at 1:50
  • Can you please edit your question to include the code you're using? Especially the wp_nav_menu() portion. – Pat J Jun 17 '20 at 1:56
  • 1
    I used 'Repair Table' link in phpMyAdmin for the table in question and got the message: REPAIR TABLE wp_usermeta "Your SQL query has been executed successfully" I guess it has been repaired – 810311 Jun 17 '20 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.