• Resolved v123456z

    (@v123456z)


    Could you please help with adoption of the “Add Post Thumbnail Shortcode” plugin https://wordpress.org/plugins/add-post-thumbnail-shortcode/

    function post_thumbnail_shortcode($atts, $content=”) {
    if(!function_exists(‘post_thumbnail_shortcode’))
    return;

    if(!$atts[‘size’])
    $atts[‘size’] = ‘thumbnail’;

    return ‘<span class=”post_thumbnail ‘.$atts[‘class’].'”>’.get_the_post_thumbnail(null,$atts[‘size’]).'</span>’;
    }

    function post_thumbnail($str){
    $args = wp_parse_args($str);
    echo post_thumbnail_shortcode($args);
    }

    add_shortcode(‘post_thumbnail’, ‘post_thumbnail_shortcode’);

    https://wordpress.org/plugins/external-featured-image/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi! I don’t understand what you’re trying to do. Could you please describe your goals? Once I know them, we can talk about the code…

    Thread Starter v123456z

    (@v123456z)

    i am try to put external image in to the post, otherwise img not visible for Facebook (sahifa theme)

    Plugin Author David Aguilera

    (@davilera)

    Images appear on Facebook if the meta tag og:image is included. You should locate that meta tag on your theme and replace the featured image with the external featured image (function nelioefi_get_thumbnail_src( $post_id ).

    Best,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adopt "Add Post Thumbnail Shortcode"’ is closed to new replies.