Hi,
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
if(is_singular())
{
$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>';
}
Cheers!
Ismael