ttiefenbach (@ttiefenbach)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • ttiefenbach
    Participant

    @ttiefenbach

    Thanks for the quick reply! Unfortunately, your code returned the topic’s title.

    That allowed me to narrow my search, though, and I was able to get the correct functions for my permalink structure:

    function my_filter_thumbnail_id( $thumbnail_id, $post = null ) {
    	if ( $post->post_type != 'topic' )
    		return $thumbnail_id;
    	
    	$forumid = bbp_get_topic_forum_id();
    	if ( $forumid == 6728 )
    		$thumbnail_id = 7091;
    
    	return  $thumbnail_id;
    }
    add_filter( 'post_thumbnail_id', 'my_filter_thumbnail_id', 20, 5 );
    

    I could probably use the bbp_get_forum_title() function to get the tiel to compare, like you suggested, but I went with just validating the ID since it was working.

    Thanks for your help!!

Viewing 1 replies (of 1 total)