Skip Navigation

[Resolved] Cannot get tag pages to display correct featured image when using Views

This thread is resolved. Here is a description of the problem and solution.

Problem:

Get term's field value in term's archive page.

Solution:

You can get current term's ID with below shortcode:
[wpv-taxonomy-archive info="id"]

Then pass it the Types image shortcode, like this:

https://toolset.com/forums/topic/cannot-get-tag-pages-to-display-correct-featured-image-when-using-views/#post-1184030

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

This support ticket is created 5 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by sidianJ 5 years, 12 months ago.

Assisted by: Luo Yang.

Author
Posts
#1183817

I am trying to: Display correct featured image on tag pages.

Link to a page where the issue can be seen:
hidden link

I expected to see: Correct featured images.

Instead, I got: Incorrect images.

#1184030

Hello,

Thanks for the details, in your case, it is a term's archive page, you can get current term's ID with below shortcode:
[wpv-taxonomy-archive info="id"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

Then pass it the Types image shortcode, like this:

[types termmeta='archive-image' title='%%TITLE%%' alt='%%ALT%%' size='full' term_id='[wpv-taxonomy-archive info="id"]'][/types]

This will be able to return term's image, it doesn't need taxonomy view

#1184387

My issue is resolved now. Thank you!