Support » Plugin: A-Z Listing » child terms under a term, and also hide empty terms

  • please add this functionality!!
    to display only terms that are child of a term.
    and also would be great to display only the ones that have posts.
    your plugin is amazing.

    • This topic was modified 1 year, 5 months ago by gaucho code.
Viewing 2 replies - 1 through 2 (of 2 total)
  • @glowzar, I’d also love to have these options.

    You can modify the core plugin files directly to achieve this, but of course any changes will be overwritten when the plugin is updated.

    I have a similar thread open with these requests, and my understanding is that the options will be included when a newer version of the tool is released, however as with all development cycles we have no way of knowing when that might happen..

    You can do this as an interim measure:

    Look at the query beginning on line 79 of the plugin file called “class-a-z-listing.php”

    $this->type      = 'taxonomy';
      $this->taxonomy = $query;
      $this->items    = get_terms(
        $query, array(
    	'hide_empty' => false,
        )
    );

    Modify it so it looks like this to make it work the way you want (but remember that the change will not persist if the plugin is updated):

    $this->type      = 'taxonomy';
      $this->taxonomy = $query;
      $this->items    = get_terms(
        $query, array(
    	'hide_empty' => true,
            'childless'  => true,
        )
    );
    Plugin Author Daniel Llewellyn

    (@diddledan)

    Good news everybody!

    You can now do hide-empty-terms="true" on the shortcode. This works in version 2.0.1 which has just been released.

    You can also limit to children of a term with parent-term="5" which takes a term-ID. Again, this is in version 2.0.1.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘child terms under a term, and also hide empty terms’ is closed to new replies.