Support » Plugin: The SEO Framework » Events Made Easy

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dimalifragis

    (@dimalifragis)

    Hello again,

    Can i use this snippet i found here?

    add_filter( 'the_seo_framework_query_supports_seo', function( $supported ) {
    
    	$tsf = the_seo_framework();
    
    	// This TSF method also works in the admin area, and prevents ID collision with terms.
    	if ( $tsf->is_singular() ) {
    
    		// Define your excluded page IDs here.
    		$excluded_ids = [ 42, 9001 ];
    
    		// This TSF method supports page-as-archive pages, like blog and shop pages.
    		if ( in_array( $tsf->get_the_real_ID(), $excluded_ids, true ) ) {
    			$supported = false;
    		}
    	}
    
    	return $supported;
    } );

    Thanks

    • This reply was modified 5 months, 1 week ago by dimalifragis.
    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    Yes, that filter still works in TSF v4.1.1 🙂

    It requires a bit of fiddling with the $excluded_ids, where you must enter the IDs of the EME pages in the array.

    Thread Starter dimalifragis

    (@dimalifragis)

    Indeed it works. Great.

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.