WordPress.org

Forums

NextGEN Facebook - Complete Meta Tags for FB, Google, Pinterest, Twitter, LinkedIn & More
[resolved] Add OG Description from All-In-One SEO (1 post)

  1. JS Morisset
    Member
    Plugin Author

    Posted 2 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;
    }

    js.

    http://wordpress.org/plugins/nextgen-facebook/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic