Support » Themes and Templates » Display First Image of Post in Slider (Not Featured Image)

  • Hello there… It’s my first post on this forum.!
    Well i’m a perfect amateur in php. So here’s my problem.

    In my theme, the slider actually picks up the featured image of the post to display it on the slider. But i’m on a limited bandwidth so i don’t upload the image to my server, i.e, no featured images in my post.

    So is there any way to set image from an outside url as the featured image to my posts??? OR a work around for the slider code to display first image of the post instead of the featured image…?

    Here are the bits of slider code which i think is related to this image picking thing:

    In featuredposts.php:
    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    In template.php:

    <div class="fp-thumbnail">
                                <?php if($this->theme->display('thumbnail', $featuredposts_moreoptions)) {
                                    if($slider['link'] && $slider['img']) {
                                        printf("%s<img src=\"$slider[img]\" />%s", "<a href=\"$slider[link]\" title=\"$slider[title]\">", "</a>");
                                    } else {
                                        echo "<img src=\"$slider[img]\" />";
                                    }
                                } ?>
                            </div>

  • The topic ‘Display First Image of Post in Slider (Not Featured Image)’ is closed to new replies.