List Custom Taxonomy Widget
[resolved] Add ID to list (4 posts)

  1. TheMikeRoss
    Posted 3 years ago #

    I wanted to determine the difference between the lists in the widget. I added an ID to line 139 in list-custom-taxonomy-widget.php

    echo '<ul id="widget_'.$tax.'">';

    Obviously this is just a suggested update, and suits my issue fine, but might need to be adjusted for the plugin.



  2. TheMikeRoss
    Posted 3 years ago #

    I also added another ID in with a div surronding the output:

    Line 85:
    if ( $title ) echo '<div id="' . $this_taxonomy . '">' . $before_title . $title . $after_title;

    I had to do this to determine the difference between two widgets, simply because I use multiple custom Taxonomies.

    Thanks for the plugin - super helpful and a big time saver.

  3. Nick Halsey
    Plugin Author

    Posted 3 years ago #

    That makes sense, I was trying to figure out a good way to add more selectors without them being ridiculous (like WordPress' instance ones), but I think using the taxonomy works because people shouldn't have two of the same one. I also added a container div around the whole thing (displayed as list or dropdown) with .list-custom-taxonomy-widget and the id, but with a container, and released an update just now. The ids are slightly different, just look at the code and it'll make sense.

  4. TheMikeRoss
    Posted 3 years ago #

    Awesome, updated and it works great.

    Thanks for this plugin - saved me a bunch of time!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.