NextGEN Facebook - The Most Complete Open Graph, Twitter Card, and Schema Meta Tags
[resolved] Add OG Description from All-In-One SEO (1 post)

  1. JS Morisset
    Plugin Author

    Posted 3 years ago #

    Recently an NGFB user contacted me about some Title and Description meta tag issues. The Open Graph description meta tag was blank because his Page content was just HTML tags and images -- so no text for the Open Graph description meta tag.

    I sent him the following code to pull a default description from All-In-One SEO (if the OG description meta tag is empty):

    add_filter( 'ngfb_og', 'custom_ngfb_og', 10, 1 );
    function custom_ngfb_og( $og = array() ) {
            $opts = get_option( 'aioseop_options' );
            if ( empty( $og['og:description'] ) && ! empty( $opts['aiosp_home_description'] ) )
                    $og['og:description'] = $opts['aiosp_home_description'];
            return $og;



Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic