To remove grand-children:
<?php $args = array(
'show_option_none' => 'Make',
child_of => 5,
hide_empty => '0',
exclude => '0',
hierarchical => 1,
depth => 1
); ?>
<b>Make </b><?php wp_dropdown_categories($args); ?>
You need to add the hierarchical and depth parameters.
Related Posts:
- How to show only the last two categories in a menu?
- add_action hook for completely new post?
- How can i list current author’s categories?
- How to Make a Category Always Selected?
- anything like add_meta_box for categories?
- Calling clean_term_cache() fails when called in the same plugin that creates terms, succeeds when called separately?
- Missing “category_children” option when dynamically creating categories via a plugin
- Can we create a category list page in WordPress?
- Dropdown list of pages to get page id to store in plugin options
- prevent post to have multiple categories in my plugin
- get_pages Drop down list for selection of a page
- Show add_meta_box by selecting a specific category
- Which are the hooks run before/after when a category’s deletion?
- how do you prevent showing a particular category on the admin dashboard for specific user roles?
- Is it possible to change a term slug before being saved to the database?
- wp_insert_category() setting the ‘cat_ID’ gives not array error
- Send push when new post is published in a certain category
- How do I get the sub categories of the parent when in a sub category?
- Filter Categories widget to allow custom sorting?
- Function/Class to list categories with checkboxes
- How can I show posts for a single category?
- Check if post belongs to any category
- How to display the categories on page using shortcode?
- How to display the category id along with category name on categories list?
- add_action pre_term_description vs. pre_category_description
- How to show parents of current page category, excluding the category?
- Load stylesheet in edit category page?
- How to relate the Category to user?
- How to exclude categories from get_categories() select list inside a widget admin panel
- How to Show Category List With Corresponding Links?
- Exclude Woocommerce Product Category From Sitemap
- Determine if term is Category or Tag
- How to check category name available or not
- Save meta box data from selected dropdown list in bbpress reply form
- delete category on plugin deactivation wordpress
- Post is uncatagorized in publish_post action
- Hide post by ‘post_category’
- Woocommerce product not appearing in category list page when created programatically [closed]
- Yoast and another plugin
- Making Woocommerce optimized for more than 500k products
- Add a new tag based on the category name in the publish event
- Creating an archive page listing external data
- How can i call from custom fields to the category editor?
- What method would I use to show an image in between X amount of posts on category archive? [duplicate]
- filter on get_posts efficiently
- How to get recent one post from each category on home page?
- $_POST form request with admin-post
- How can I configure Docker for developing and deploying a custom theme?
- How can I run AJAX on a button click event?
- What is the difference between using global $current_screen and get_current_screen()?
- How Do I Make WordPress Run an Event Every Day?
- How can I change the frequency of a scheduled event?
- How to filter $post->post_content prior to save
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to check if certain plugin exists and in expected version
- How to add SQL file with PHP to WordPress database [closed]
- How can I call template partials inside my custom plugin
- How to store a medium amount of options?
- Beginner advice
- Multiple options pages validation for a plugin
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- get_option() not returning expected value from plugin
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Testing Rewrite Rules with PHPUnit
- Add a page in admin without adding menu item
- Avoid updating post when sending POST or GET request to post.php
- should i be checking for jquery before enqueing it in a plugin
- WordPress Specified file failed upload test
- WordPress theme options Menu
- Catching Gutenberg sidebar switch event
- Can’t retrieve body params from PUT endpoint using formdata
- Workflow for new importer plugin – your advices?
- How to automatically activate a plugin on install
- disable defaault wordpress comments from a plugin
- add_editor_style to the blog editor view (Gutenberg?)
- jQueryUI draggable doesn’t work in WordPress plugin
- call funcution when clicking submit
- How do I get a reference to the HTML memory buffer while the page is being constructed?
- add_option_{$option} action hook not being called
- Remove all capabilities in separate method fails versus included in method
- Hook for plugin to show content for certain urls
- Dropdown switching subcategories portfolio
- add short code not working
- Shortcode attribute “title” doesn’t appear in $atts array
- wp_head is not fired from the hook I have used in my plugin
- Admin Message after Plugin Option Updated
- How react js and other Javascript Technologies works on WordPress plugin?
- Shortcode rendered in preview, but empty in post
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Add custom data-attribute to core Gutenberg block within an template
- Can I log the searches that are returning 404 in the DB?
- Install a MU plugin from within another plugin
- Do Not Back Up? Is there any accepted way to tell backup and clone plugins to skip a certain file? [closed]
- get_the_tags($ID) is empty during publish_post callback
- Why is WordPress wrapping search for users that looks like integers with asterisks and how do I fix it?
- wp cron does not run when i am not logged in to wp admin
- update_option with array_push adding mutiple copies
- How to enable auto update for embedded plugins
- My activator class isn’t running the code inside
- Remove Gutenberg Buttons Block