• Resolved rmmoul

    (@rmmoul)


    The option shows up on the course pages to exclude them from search but checking the box and saving, the course still shows up in the search results.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor pronskiy

    (@pronskiy)

    Hi @rmmoul,

    It looks like LearnDash is a paid plugin, so I’m unable to verify. Please feel free to reach out via email [email protected], and I’ll help to resolve this.

    -Roman

    Did this have a resolution?

    Thread Starter rmmoul

    (@rmmoul)

    @cbctraining We ended up using the pre_get_posts filter to exclude a specific tag from the search results.

    
    add_filter('pre_get_posts', 'exclude_private_tag_from_search');
    function exclude_private_tag_from_search($query){
    	
    	if(!$query->is_admin && $query->is_search && $query->is_main_query()){
    		$query->set('tag__not_in', array(44)); // 44 is private tag id
    	}
    
    	return $query;
    }
    

    Thanks @rmmoul – I really appreciate the detailed reply. I’ve managed to find another plugin which works with Learndash. Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn’t seem to work with LearnDash courses’ is closed to new replies.