If you want to hide sub menus all you need to do is not have them in the first place. Try going to the admin panel’s menus section and just remove the unwanted sub menus from the menu itself.
Related Posts:
- Generate a tabbed submenu — from taxonomy term or submenu item — with sample content
- Order by menu structure
- Warnings in nav-menu when visiting query pages [closed]
- My Main Query Modification is Messing up my dynamic main – why?
- Set if condition with wp_nav_menu
- Show all data in database table and make it into an interactive table
- wp_trim_words strips dashicons
- parse_tax_query causing Navigation Menu To Disappear
- How to get current page nearest parent id?
- How to get main menu only with wp_nav_menu
- Get Child of Child Pages in custom Menu
- Displaying Pages in Nav Sub-Menu with Specific Taxonomy Terms?
- Calling body_class and wp_nav_menu for a different post
- Show parent’s child and also child’s, child on a page?
- Added Date Filter To Popular Posts Query
- Remove from array in WP_Query loop
- Paginate pages with dynamic query
- Phpmyadmin – post editing
- WP_Query loop doen’t work with my custom taxonomy
- Limit number of posts in WP_query per month
- How can I detect if the current post is in this loop?
- Advise on Templates for Custom Queries
- wp Query Posts to display in Nivo Slider
- WordPress | WP_Query does not return anything with s=a
- Randomly pick one testimonial post
- How to get only ONE category of “Portfolio” posts to display on main page rather than ALL categories?
- filter posts by meta key with pagination
- Determining what post is displayed out of total posts found
- Trouble Making WP_Query paged
- Removing Submenu from Menu
- Single post – display list of all posts + specific post
- Reordering content using a meta value
- Search.php – return number of results but cannot loop through
- Tax_Query using WP_Query not working
- How do I get the content of a custom instance of WP_Query?
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Creating ‘posts page’ loop based on the page itself
- Controlling sub-menu within sub-menu
- Why does apply_filters behave different inside and outside a loop?
- Change post query onclick
- How to WP Query custom multiple custom taxonomies?
- An alternative to WordPress’s built-in menu functionality
- How to add a recent post function to a text widget I created for practice?
- Can I make a search query which includes a space?
- WordPress Queries Not Working?
- WP_Query meta compare must include ALL array values
- Determine if ID is page or post and query the ID
- How to sort queried pages by an array of page ids?
- How to query for a page, get data, then query for child pages of that page
- Help with if statement inside while loop
- Excluded category from loop
- Add content depending on page loaded
- Custom template for password protected page
- Links in the_content not linked
- wp-query problem with author
- Widgets: Show Recent Posts Only if the Posts Have Both Categories X and Y
- WP_Query Class custom field parameters
- how to retrieve WP_Query without ordering by date [duplicate]
- How to apply pre_get_posts to a custom query?
- WP_QUERY tax_query not working
- How to get latest post excerpt from a specific category?
- Which is from this queries is more faster
- Start Query from 2nd Post without offset
- Get all content on a “single page” site depending on language
- Get list of all Grandchild Pages
- Execute PHP function inside the admin area
- get latest added term from taxonomy and insert into php variable
- meta_query returning excluded result
- WP_Query: attachment image in “full” size?
- Featured images loop for Orbit Slider
- Filter subpages in while loop from WP Query object
- Attempt to display site authors in a carousel – User Image not Outputting inside li tags
- Adding pagination to sub-wp_query within a singular post page
- How go give $value to wp_query
- Show multiple tax_query from 2 or more post_type in a single code
- wp list pages using meta box value
- Add AJAX “Load more” on custom query block
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- get_var is neither a string, integer, or array …?
- Posts limit on homepage (genesis framework)
- How to filter a static post page with ajax and $wp_query
- Query not sorting DESC
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- how to translate countries output from wp database?
- WP_Query with 2 genres
- wpquery via ajax
- Custom query does not find pages
- Deleting terms from the WordPress wp terms table
- Display posts from an array of ID’s
- Pagination problem by using WP_Query
- Date not appearing in custom query
- Custom taxonomy in WP_Query not working
- Custom post type – filter content by custom meta box content
- Trying to output content from page, works locally but not online
- Add category to my get_post query
- Ajax (jquery) wp_query pagination returns -1
- Why always one post missing
- wp_list_pages() not showing on posts
- Query WP Page for Buddypress Group Home [closed]
- How to sort by most watched in X days/months