• Glad to see this plugin is seeing some updates–it’s been a long time!

    Any chance we can get support for “All posts in (taxonomy term)” added to the plugin? Right now the plugin only supports “All posts in (category)” and “All posts in (tag)” but no way to determine sidebars based on a custom taxonomy term.

    We edited the plugin files several years back to support this, and the specific edits still work on the latest version.

    Line 294 – delete or comment out if ( $k == 'category' ) {
    Line 296 – delete or comment out }

    ^ Gets rid of the category restriction so all taxonomy terms support “all posts in” checkbox when setting up a widget area

    Line 439 – add the following:

    			global $post;
    			
    			$post_taxonomies = get_post_taxonomies(get_the_ID());
    			
    			foreach($post_taxonomies as $post_taxonomy)
    			{
    				$term_list = wp_get_post_terms(get_the_ID(), $post_taxonomy, array("fields" => "ids"));
    				foreach($term_list as $term)
    				{
    					$this->conditions[] = 'in-term-'.$term;
    				}
    			}

    ^ Lets the sidebars display based on “all posts in (term)” condition.

    Seemed pointless to bring this up before when the plugin was dormant for several years, but if it’s actually being updated… any chance we can get this supported by default?

Viewing 1 replies (of 1 total)
  • Thread Starter wekhter

    (@wekhter)

    I completely forgot to say in my previous post–those edits are to /classes/class-woo-conditions.php

    In case the plugin isn’t updated with the ability to apply a widget area to all CPTs in a term, that’s where anyone can made the edits to enable it.

Viewing 1 replies (of 1 total)
  • The topic ‘CPT term support’ is closed to new replies.