• Resolved megamatz

    (@megamatz)


    Im using a theme that display the original feature image of a post on the main page.

    I now want to swap that image and instead show the second feature image that I added with this plugin.

    The current code showing the original feature image is in the header.php file in it`s theme folder and looks like this:

    <?php the_post_thumbnail(‘bigthumb’,array(‘title’ => ”)); ?>

    How can I show the second feature image here instead?

    Can someone help me?

    https://www.ads-software.com/plugins/dynamic-featured-image/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter megamatz

    (@megamatz)

    Solved it!

    I used this code:

    if( class_exists(‘Dynamic_Featured_Image’) ) {

    global $dynamic_featured_image;
    $featured_images = $dynamic_featured_image->get_featured_images(get_the_ID());

    foreach( $featured_images as $image ) {
    echo “<img src='{$image[‘full’]}’ />”;
    }

    }

    How do you use the medium or large image in wordpress instead?

    megamatz
    works for me too , you are a hero ??

    do you know how add alt tag and a link to the post to the image ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Swap the original feature image’ is closed to new replies.