WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Add my own OpenGraph namespace (2 posts)

  1. benetj
    Member
    Posted 1 year ago #

    Hello,
    How can I add my own opengraph namespace with the WordPress-seo?
    It's planned in the plugin future development?
    In the WordPress-seo api page, I only saw the option to change the type.

    Thanks!

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. benetj
    Member
    Posted 1 year ago #

    I got it!
    In functions.php intercepts the 'language_attributes' filter and make a substring

    function add_custom_opengraph_namespace( $input ) {
    	return substr($input, 0,-1) . ' customns: http://ogp.me/ns/fb/customns# " ';
    }
    add_filter( 'language_attributes','add_custom_opengraph_namespace');

    That's it!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic