• Hi,

    This is a fantastic plugin, but I have a large site that has a lot of categories and thought this would be a perfect way to get around them if I could display only the children of a category, so I have been tinkering to make it do this!!

    The changes seem to work OK on my development server, but I am not sure if you want it to do this (or even the correct way to submit code as you can see!) or if anyone else wants to do the same thing, but the code changes are only small so I thought I would share and see if it was useful to anyone…

    I altered the short code to use a “child_of” parameter


    extract(shortcode_atts(array(
    "columns" => "2",
    "more" => "View More",
    "hide" => "no",
    "num_show" => "5",
    "toggle" => "no",
    "show_empty" => "no",
    "name_divider" => "|",
    "tag_count" => "no",
    "exclude" => "",
    "descriptions" => "no",
    "width" => "",
    "equal" => "no",
    "manual" => "",
    "basic" => "no",
    "basic_heading" => "no",
    "show_categories" => "no",
    "child_of" => "0",
    "taxonomy" => "",
    "group_numbers" => "no",
    "show_navigation" => "no",
    ), $atts));

    and likewise


    <dd>basic_heading => '.$basic_heading.'</dd>
    <dd>show_categories => '.$show_categories.'</dd>
    <dd>child_of => '.$child_of.'</dd>
    <dd>taxonomy => '.$taxonomy.'</dd>

    and finally restrict the returned categories to those that are children of the category you set “child_of” to


    } elseif($show_categories == "yes"){
    $tags = get_categories('child_of='.$child_of.'&order=ASC&hide_empty='.$show_empty.'');
    } else {

    So now if you set the show_categories to “yes” then you have the option of setting the “child_of” to the ID of the category you want the children of (it defaults to 0 so shows all if not set)

    As I said I have just been tinkering to make it work for my own purposes so make no promises that it will work, but hope someone (other than me!) finds it useful

    Matt

    https://www.ads-software.com/extend/plugins/multi-column-tag-map/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tugbucket

    (@tugbucket)

    Hey Matt,

    Saw this and added it to the core of the plugin. I expanded it a little to allow multiple child_of. So in version 11.0 you can do:

    child_of="2, 4, 29"

    And it will show only categories that are children of the listed categories.

    Good idea.

    Hi tugbucket

    Thanks for the great plugin – been using it for several months now.

    My question – is there documentation describing how to use the 5 new options in v11 ?

    whoops – ignore me – I just found them in the updated INSTALLATION tab.

    Plugin Author tugbucket

    (@tugbucket)

    I’m marking this as resolved. It looks like photoMaldives has got this working.

    Thread Starter mtulett

    (@mtulett)

    Hi Alan,
    No problem and thanks for adding the code in, much easier to keep things up to date now!
    Matt

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Multi-column Tag Map] How to only display children of a category’ is closed to new replies.