Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

Go into Theme, Customize, and there should be a "Menu" choice. Select an existing menu (if still there) or create a new one. When you change themes, you often have to re-specify the menu again, even if it already exists. The 'three-bar graphic' (AKA "hamburger") is shown at certain (usually smaller) screen sizes. That is a function of how the theme does ...


0

I haven't tried it but this seems to answer the your criteria https://www.quora.com/In-WordPress-how-do-I-add-a-widget-to-a-menu


1

You could use the wp_get_nav_menu_items filter add_filter('wp_get_nav_menu_items', 'prefix_add_categories_to_menu', 10, 3); Then you could do something like this: function prefix_add_categories_to_menu($items, $menu, $args) { // Make sure we only run the code on the applicable menu if($menu->slug !== 'replace_this' || is_admin()) return $items; ...


0

This function in /themes/lucid-press-child/js/custom-js.js is your problem. function homepageNavigationClasses(){ if(jQuery('body.home').length){ //jQuery('#navigation a').not('.sub-menu a').click(function(event){ jQuery('#navigation a').click(function(event){ var clickedLink = jQuery(this).text(); clickedLink = ...


0

Make a button and a div on the page template Make the button toggle the visibility of the div When the div is toggled to be visible, have it populated by a WP_Query that fills it with menu items.


0

Depending on your exact need, you might want to utilize the Customizer API to register some custom settings to the Customizer, which would allow the user to select one of the predefined layouts (for header, footer, etc.). Or if you prefer to have a theme options page on the dashboard, have a look at the Settings API. You would then have the different ...


1

A more standard way to enqueue stylesheets in WP admin is to use wp_enqueue_style function on admin_enqueue_scripts hook. if I do any changes afterwards it doesnt update This sounds like a browser cache isssue. You can bust the cache by adding a dynamic version number parameter to the stylesheet url with the native php function filemtime. It returns the ...


1

This plugin provides filter to manage the menu item by meta value: function custom_menu_item_visibility( $visible, $item ){ if( isset( $item->roles ) ){ $user_id = get_current_user_id(); $user_meta = get_user_meta( $user_id, 'your-meta-key', true ); if ( /* your condition */ ){ $visible = true; } ...


0

Here is a plugin that does the same. function get_posts_per_taxterm($taxonomy, $term_id ){ $posts = get_posts( array( 'posts_per_page' => -1, 'post_type' => 'post', 'orderby' => 'menu_order', 'order' => 'ASC', 'tax_query' => array( array( ...


1

To enable menu item based on user role you can try this plugin: https://wordpress.org/plugins/nav-menu-roles/


0

First, really stupid question: Do you save your new menu after making the changes? Sometimes it's the little things that mess everything up. Aside from that, it might be a theme problem. Change to one of WordPress default themes (Twenty XYZ series) and see if the problem persists.


1

Based on "Remove Pagination in Appearance -> Menus -> Categories" answer thread for WordPress categories, you will adapt the answer code to WooCommerce Product Categories. The taxonomy of WooCommerce Product category is product_cat. Is also better to target admin nav menus only. Try the following (untested): add_filter( 'get_terms_args', '...


Top 50 recent answers are included