Support » Plugin: Related Posts by Taxonomy » Esclude posts from related posts widget does not work

  • Francesco

    (@fcolombo)


    Hi, something I’ve just noticed today.

    I use the related post widget on some pages, where I want to display related posts from one specific custom taxonomy.

    The “Exclude terms with the widget” snippet found here no longer works.

    My related posts widget displays posts that have been added to $args['exclude_terms'] = array( ); and that therefore should not appear in the widget.

    Has anything changed with the most recent updates?

Viewing 1 replies (of 1 total)
  • Francesco

    (@fcolombo)

    Nevermind… It works now. Must have been a caching issue!

    Out of interest, what’s the different between the old code posted on the website:

    
    function related_posts_exclude_terms_widget( $args ) {
        $args['exclude_posts'] = array( 1, 2 );
        return $args;
    }
    

    And the new one?

    
    function related_posts_exclude_terms_widget( $args ) {
    $args['exclude_terms'] = array( 1, 2 );
    $args = related_posts_exclude_terms_strict( $args );
    return $args;
    	
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Esclude posts from related posts widget does not work’ is closed to new replies.