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

    (@cybr)

    Hi Nick,

    I recommend using the “Featured Image”. It’s up to the theme to display that image.

    The best way to force it without using the “Featured Image”, currently, is using a filter. For example on Post ID 5:

    add_filter( 'the_seo_framework_og_image_args', 'my_awesome_og_image' );
    function my_awesome_og_image( $defaults = array() ) {
    
    	//* You don't have to escape this URL
    	if ( is_singular() && 5 === $defaults['post_id'] )
    		$defaults['image'] = home_url( '/path/to/yourimage200_to_1500px.jpg' );
    
    	return $defaults;
    }

    An image uploader is planned for 2.8.0 or as a free extension. Alas, I still have to get started on it.

    I hope this helps!

    Thread Starter nickwilmot

    (@nickwilmot)

    Thanks Sybre, that’s helpful.

    Nick

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a custom og:image to the homepage’ is closed to new replies.