Sybre Waaijer on "[Plugin: The SEO Framework] Adding a custom og:image to the homepage"

ساخت وبلاگ

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' ); retu $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!

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 231 تاريخ : پنجشنبه 30 ارديبهشت 1395 ساعت: 19:12