don’t use featured image for thumbnail

0
don't use featured image for thumbnail 1
Anonymous
Dec 04, 2018 08:26 AM 2 Answers General
Member Since Jan 1970
Unsolved Solved Mark as Solved Mark as Unsolved
Subscribed Subscribe Not subscribe
Flag(0)

Our posts have two different images that are specified, the standard featured image, which is displayed at the top of the page and a cover image which is then used in the body, the cover image has it's own field.

How can I get the post grid to use the cover image instead of the default featured image?

Is this something that can be done in the pro version?

Thanks!

2 Subscribers
don't use featured image for thumbnail 2
Submit Answer
Please login to submit answer.
2 Answers
Sort By:
Best Answer
0
don't use featured image for thumbnail 3
PickPlugins
Dec 05, 2018
Flag(0)

I am not sure how your second image is saved via meta field, if its save image url then you can directly, you need to add this code to your theme functions.php file

function post_grid_filter_html_media_extra($html_media){


  $loop_post_id = get_the_id();

// you need to replace 'meta_key_image_url' by your meta key
$meta_key_image_url = get_the_meta($loop_post_id, "meta_key_image_url", true );
if(!empty($meta_key_image_url ))
return 'don't use featured image for thumbnail 4 ';


}

add_filter('post_grid_filter_html_media','post_grid_filter_html_media_extra');

Let me know for more help.

Regards

Sign in to Reply
Replying as Submit
Best Answer
0
don't use featured image for thumbnail 3
PickPlugins
Dec 04, 2018
Flag(0)

Welcome to our forum.

There is a filter hook for thumbnail so you can filter the thumbnail HTML, please see the documentation.

https://pickplugins.com/documentation/post-grid/filter-hooks/filters-post_grid_filter_html_media/

Let me know if you have any issue.

Regards

don't use featured image for thumbnail 6
PickPlugins
- Dec 05, 2018 08:22 AM
Flag (0)
0

Can you please follow my answer at the top.

don't use featured image for thumbnail 7
envirodefence
- Dec 04, 2018 09:57 PM
Flag (0)
0

unfortunately I have no idea what to do with this, I haven't done any programming in years so I wouldn't know where to begin, thanks, but I think I might have to look somewhere else, which is a shame as this plugin was the closest that came to actually working, except for the image problem, the others we tried just kept crashing

Sign in to Reply
Replying as Submit