If found out that this is removing my menu:
function add_menu_icon ( $items, $args ) {
if ( $args->theme_location == 'primary' ) {
$elements="<li class="custom-logo">"
. get_custom_logo() .
'</li>';
$elements .= $items;
$items = $elements;
return $items;
}
}
add_filter( 'wp_nav_menu_items', 'add_menu_icon', 10, 2 );
I still haven’t figured out why.
Related Posts:
- How to remove hardcoded characters from playlists?
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- How can I add a class to a single menu item?
- Understanding WordPress child theme custom JS loading
- Use different javascript files for each page on website
- Trigger popup in a php if/else statement
- Multiple WordPress Menus that will only display all pages
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- Need Help Fixing My Iframes [closed]
- Menu jumping when calling it via PHP
- Redirect to another page using contact form 7? [closed]
- Show About and Contact Us page when they’re clicked in the top menu.
- How to modify mobile nav menu text in theme
- Output only links using wp_nav_menu()
- Get css class of menu item in custom menu structure
- How to add aria role and schema markup to custom walker container
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why in this WordPress theme I can’t see the Main Menu?
- How to tell if a user has gone in and created a menu
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- Remove the Tag from wp_nav_menu
- security concerns if using html data-* attribute for l10n?
- How to extend SelectControl with data from my theme
- register dependency css and js inside a plugin class
- Collapsible menu on post sidebar only expands and does not collapse
- Bring Font Awesome icons inside menu A tags
- How to send Ajax Call from frontend without using wp_localize_script in Theme
- if is_home(), change class of menu-item-225 of wp_nav_menu
- What is considered good practice for registering menu locations?
- start_lvl Ignored in Custom walker_nav_menu
- WordPress Themes and PHP unit
- wp_delete_auto_drafts() deletes links in menus
- Check if a menu is empty?
- Dynamically change feature image in customiser
- Walker class: Problems with understanding how walk() method can be called without error
- How can I access the “description” of a menu item?
- Where exactly do I write define( ‘WP_DEBUG’, true ) in wp-config file
- Is it possible to use the featured image of a page as a css background without inlining?
- How do I translate this string – PHP syntax question
- items_wrap not working
- using add_action for a header hook that has an additional parameter
- Have CSS Class Added with `is_page()` WP function
- Slide in Panel WordPress Post
- Using shipped version of jquery
- Run a filter when a walker runs
- Bridging TinyMCE js and WordPress PHP?
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- class click counter save number
- Populate dropdown with Child Pages based on Parent Page chosen
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Integrating PHP into Javascript to display map markers with Google API – problem with wp_localize
- How does wp_enqueue_scripts work?
- How do I Import / Upload Files with jQuery AJAX?
- HTML escaping data with ajax requests
- Add login hyperlink to secondary navigation menu
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- How to specify the path for require_once in a child theme?
- How to use wordpress function wp_enqueue_script() in php?
- Validate and Sanitize WP REST API Request using WP JSON Schema?
- Getting posts to exclude from array
- home.php show blog posts as grid view
- Custom post type permalinks do not appear using the link functions
- Using bloginfo and divs inside a php file
- How to organize functions.php content
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Search page results conflicting logic – Search result caching?
- Menu not styling. New menus functionality giving me a headache
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- Show next image in array if page is revisited by same logged user
- Adding markup to sub menu based on class
- excep tonly one css, don’t load any css
- Using Google Analytics in an enqueued JS file
- How do I disable cache for a certain page?
- How To Get HTML Eelement From Another Page
- Conditional Banners
- Update $wpdb query with AJAX
- add custom link to gallery images
- AJAX to add to cart multiple products woocommerce
- Filter portforlio with librairie isotop
- Add parent menu item in sub-menu in custom nav_walker
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- How to properly escape in ternary operators – Wp Coding Standards?
- admin-ajax.php 400 bad request – whats wrong with my code?
- Force ‘permanent’ post cache of shortcode results
- Rotating Header Images
- WP Knowledge Base Theme bug – Subcategories and Articles, Need to change WP_Query
- Not able to call class in NHP framework
- How do I modify the with wp_nav_menu()
- Make a permalink to the most recent blog post
- How to edit the default database of WordPress [closed]
- Inserting a shortcode into a genesis menu?
- notify users when changed database
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Having trouble customizing toolbar on wp_editor
- Load wp_editor on button click
- Social Sharing Buttons in Recent Articles List
- Weird Javascript:void(0) code in my website
- how to escape alert/window.location.replace with variable