custom post type dynamically shows in menubar in wordpress
custom post type dynamically shows in menubar in wordpress
custom post type dynamically shows in menubar in wordpress
Classic Themes What wordpress hooks can be used to override how the primary menu is displayed in my wordpress header’s navigation menu — ideally in a way that will work cross-theme. This isn’t possible to do in a cross theme way, and there is nothing in WP that indicates if a hamburger menu is used, … Read more
Add a new menu selector element into WordPress nav-menus.php
How to add a Year shortcode in wordpress Menu
wp_nav_menu parent in submenu
Replace the menu entry for “travel” with “travel to destination”, then change the text in the menu item to “Travel” You can also do a redirect using a redirection manager plugin and redirect the /travel/ url to the sub category
Ok, I found a solution. I used a combination of a plugin that allows me to add shortcode to menus and creating a new shortcode for product categories in functions.php. Here is the code for the shortcode: function display_product_categories_hierarchy($parent_id = 0, $first = true) { $args = array( ‘taxonomy’ => ‘product_cat’, ‘hide_empty’ => false, ‘parent’ … Read more
How can I display different menu for logged in users using a block theme
This code is pulling in custom posts automatically and setting menu order as it does within the function, so trying to change the order in the menu editor will likely cause an error. To change the order change this line: foreach ( get_posts( ‘post_type=cpt-post-type-here&numberposts=-1’ ) as $post ) { to foreach ( get_posts( ‘post_type=cpt-post-type-here&numberposts=-1&order=ASC’ ) … Read more
Why is wp_nav_menu() not removing the container around the nav ?