chuckreynolds / WPFBOGP

WordPress Open Graph plugin development
wordpress.org/plugins/wp-facebook-open-graph-protocol/
13 stars 19 forks source link

look into force_fallback loop and get featimg working on pages that are the blog #53

Closed chuckreynolds closed 9 years ago

chuckreynolds commented 9 years ago

is_home() && get_option('page_for_posts') is a page that's showing the blog. we should check to see if that has a featured image and then display it. currently it ignores it because it's is_home. Update helper_codes at bottom of output too.

chuckreynolds commented 9 years ago

option page_for_posts() shows thumbnails for posts in the blog index query not the page itself so I removed this for now

if ( is_home() && 'page' == get_option( 'show_on_front' ) && has_post_thumbnail( get_option( 'page_for_posts' ) ) ) {
    $wpfbogp_featured_img_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_option( 'page_for_posts' ) ), 'full' );
}