Showing featured images in your News app

Vendrux offers an option to include your featured image at the top of every article. This will be the default behavior in your app.

If you’d rather show the image elsewhere in the article, for example below the title, you can use the Editor functionality and add the following code in any PHP positions, such as “PHP before content”.

$image_feature = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
if(!empty($image_feature)) {
echo ‘‘;
}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *