Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter mayukhnair

    (@mayukhnair)

    Thanks for the response. Luckily I was able to solve the problem, so I’m leaving the answer here for the rest who may stumble upon this.

    You still need to add the action remove_wpseo to functions.php to override Yoast on the page.

    add_action( 'template_redirect', 'remove_wpseo' ); 
    /** * Removes output from Yoast SEO on the frontend for a specific post, page or custom post type. */ 
    function remove_wpseo() { 
    if ( is_single ( 1 ) ) { 
    $front_end = YoastSEO()->classes->get( Yoast\WP\SEO\Integrations\Front_End_Integration::class ); 
    remove_action( 'wpseo_head', [ $front_end, 'present_head' ], -9999 ); 
    } 
    }

    Turns out link previews on apps are dictated by the Open Graph meta tags, which is what I was missing. I added <meta property = 'og:title' content = '<dynamic title content based on the ID>' /> to my page code, and it worked. Without the 'og:title' property defined for your page title, link previews may not work for an app.

    You can use the existing <meta name='description' property to add a description dynamically.

Viewing 1 replies (of 1 total)