• i have showing 3sub category.
    this code not show.
    <?php wp_dropdown_categories('show_option_none=Select One&orderby=name&order=ASC&hide_empty=0&hierarchical=1&child_of=28,52,45'); ?>

    please help me.

Viewing 9 replies - 1 through 9 (of 9 total)
  • If you do not want the (grand) child categories to show then add ‘&depth=1’ to the parameters of the code you gave above.

    <?php wp_dropdown_categories('show_option_none=Select One&orderby=name&order=ASC&hide_empty=0&hierarchical=1&child_of=28,52,45&depth=1'); ?>

    Thread Starter matt-press

    (@matt-press)

    not show child category,
    ??

    If you do not want the (grand) child categories to show then add ‘&depth=1’ to the parameters of the code you gave above.

    Change the depth parameter to 0 for all children, or a number greater than one for how many generations of child categories you wish to display.

    Try this:

    <?php wp_dropdown_categories('&show_option_none=Select One&orderby=name&order=ASC&hierarchical=1&child_of=28,45,52&depth=0'); ?>

    This will only display if there are sub-categories of the category IDs 28,45, and 52

    Thread Starter matt-press

    (@matt-press)

    <?php wp_dropdown_categories('&show_option_none=Select One&orderby=name&order=ASC&hierarchical=1&child_of=28,45,52&depth=0'); ?>
    This code showing all category and child category in site.

    i want showing child category 28,45,52.
    not show other category and child category.

    thanks much

    After much more testing I am finding that wp_dropdown_categories() is only accepting one category ID in the ‘child_of’ parameter, additional categories are actually causing the the function to not appear in my test environments.

    That being the case, I cannot see how the code you are showing as an example is producing the results you are claiming.

    Can you provide more details, such as: URL, theme, version, etc? If you need help with that please see my BNS Support plugin.

    Thread Starter matt-press

    (@matt-press)

    * Theme: v a child of the ClassiPress theme v2.9.2
    * Current User Level: 10
    * Active Plugins:BNS Support 0.4
    by Edward Caissie (url)
    Breadcrumb NavXT – Adminstration Interface 3.2.1
    by John Havlik (url)
    Contact Form 7 2.0.1
    by Takayuki Miyoshi (url)
    Daily Top 10 Posts 0.6
    by Andrew dela Serna (url)
    Google XML Sitemaps 3.2
    by Arne Brachhold (url)
    SB Welcome Email Editor 1.1
    by Sean Barton (url)
    User Photo 0.9.4
    by Weston Ruter (url)
    WP-PageNavi 2.40
    by Lester ‘GaMerZ’ Chan (url)
    * wordpress veression is: 2.9.1

    I put the code in the page1.php
    this page upload for you.

    Thank you for installing the BNS Support plugin, but you did not include the first two lines of the information it shows which includes your blog’s URL?!

    I looked at the code you “uploaded” for me and I am not seeing any issues with the wp_dropdown_categories() function or the calls you are making with it.

    Thread Starter matt-press

    (@matt-press)

    i’m waiting your reply.

    … you did not include the first two lines of the information …

    There is nothing more I can offer beyond what I have already written. If you wish more in-depth help, or review, then you might consider a posting at WP Jobs (see link at the bottom of this page); or feel free to contact myself directly.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Not Show Child Category’ is closed to new replies.