We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Changing image and excerpt source to use meta for some lists Reply To: Changing image and excerpt source to use meta for some lists

#11185
Tom
Keymaster

Awesome.

So on those lists, set your content type to “None”.

Then, do this:

add_action( 'wpsp_before_content', function( $settings ) {
    $targets = array(
        '12345', 
        '34567', 
        '56789',
    );

    $content = get_post_meta( get_the_ID(), '_yoast_wpseo_opengraph-description', true );

    if ( in_array( $settings['list_id'], $targets ) && $content ) {
        echo $content;
    }
} );

So that should do the content.

For the featured images – do existing featured images exist?