Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #182918


    Im migrating a rather big blog (~800 Posts) to Enfold. So far I’m making good progress, but now I’m stuck at some point:
    The old blog did not use featured images but rather had a custom field with the url of the image (don’t ask why).

    So what I’m trying to do is to change loop-index.php in a way that it checks for this custom field and uses the image found there, or if it’s empty use a featured image.

    Any hints on how to accomplish this?

    Thank you,


    Hi kaMai!

    You replace these lines with the get_post_meta for custom fields:

    //on single page replace the link with a fullscreen image
                $link = avia_image_by_id(get_post_thumbnail_id(), 'large', 'url');
            //echo preview image
            if(strpos($blog_style, 'big') !== false)
                if($slider) $slider = '<a href="'.$link.'">'.$slider.'</a>';
                if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>';



    Alrighty, thanks Ismael!

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

The topic ‘How to use featured images from a custom field’ is closed to new replies.