最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

menus - is MariaDB error related to Automatically add new top-level pages

programmeradmin0浏览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')
);?>

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')
);?>
Share Improve this question edited Jun 17, 2020 at 4:07 810311 asked Jun 16, 2020 at 2:51 810311810311 417 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 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?

发布评论

评论列表(0)

  1. 暂无评论