• Resolved Jakub

    (@kaderavek)


    Hi, after some months we have problem with filter the_seo_framework_generated_description – its stop working in same last update – we use it for custom post type archive. We use same way filter the_seo_framework_title_from_generation a it works great. Thanks for helping.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    We haven’t changed the_seo_framework_generated_description in about 3 years.

    Have you updated anything else in your WordPress environment? Could you show me the filter you’re using and tell me where it’s invoked/called? Thanks!

    Thread Starter Jakub

    (@kaderavek)

    Hi Sybre,

    thanks for your reply!

    No I don’t make any update of my env. We use it in multisite. We use it in framework Sage. In the same file we use filter the_seo_framework_title_from_generation an it works normally.

    We use it this way:

    add_filter( 'the_seo_framework_generated_description', function ( $description ) {
    if ( App\is_web( 'sb' ) ) { // custom function detect website by global $blog_id;
    		if ( is_post_type_archive( 'wpj_discussion' ) ) { // custom post type wpj_discussion archive
    			$description = 'My custom desc';
    		}
    }
    
    	return $description;
    } );

    Thank for your help

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    To ensure your hook hooks best, please change the filter’s priority to a number higher than the default (10), e.g.:

    add_filter( 'the_seo_framework_generated_description', function ( $description ) {
    if ( App\is_web( 'sb' ) ) { // custom function detect website by global $blog_id;
    		if ( is_post_type_archive( 'wpj_discussion' ) ) { // custom post type wpj_discussion archive
    			$description = 'My custom desc';
    		}
    }
    
    	return $description;
    }, 99 ); // higher priority!

    If that doesn’t work, please debug (dump) the App\is_web() and is_post_type_archive() calls. If neither of those dump anything, then the filter may not run: perhaps you have specified a custom description; preceding the generated one.

    Thread Starter Jakub

    (@kaderavek)

    Hi Sybre,

    thank youp. It’s very strange because we not change nothing (except update plugins a WP core) and it’s start working. We will watch it again but now we don’t see any trouble.

    Have a nice day

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter The description-related filters affect all functions that make use of the’ is closed to new replies.