Menu not show
-
Hello,
In my theme I use the ocdi/after_import hook to specify the imported menus for the theme menu locations, but when I’m done importing the main menu is not displayed even though the data has been imported.
function royalcar_after_import_setup() { $header = get_term_by( 'slug', 'Primary', 'nav_menu' ); set_theme_mod( 'nav_menu_locations', [ 'menu-1' => $header->term_id, ] ); $front_page = get_page_by_title( 'Home' ); update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $front_page->ID ); update_option( 'permalink_structure', '/%postname%/' ); } add_action( 'ocdi/after_import', 'royalcar_after_import_setup' );
View post on imgur.com
Thank you in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Menu not show’ is closed to new replies.