Skip Navigation

[Resolved] Termate in conditional

This support ticket is created 5 years, 6 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 5 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1359731

Hi Toolset,
Please help me to make this works:

[wpv-conditional if="('[types termmeta='tax-content' output='raw'][/types]' ne '')"]Tax Content Exist[/wpv-conditional]

I use beaver builder and this conditional not working.

Thanks

#1359829

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Rezas,

Thank you for getting in touch.

If you were to add this to the page only [types termmeta='tax-content' output='raw'][/types] does it return a value ?

You can only retrieve a term meta if :
A) You are using a view that is listing out taxonomy terms.
B) On a taxonomy archive.

If you page is just displaying the post then you won't be able to list the term meta. You will need to create a view that will be added to the page to list out the taxonomies and in that view you can retrieve the term meta.

Thanks,
Shane

#1360237

Hi Shane,
Hope you're great today.

So I want to show "read more" if this termmeta exist.
Is it possible to have "if" for it?

Thanks 🙂

#1360469

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-10-11 at 9.36.54 AM.png

Hi Rezas,

I'm assuming that this is on a post and the read more should link to the post page.

So in this case you will need to create a taxonomy view and add the query filter for that taxonomy to list the items of the current page. See Screenshot for example .

You will add a taxonomy term filter so it will list the taxonomy for the current page.

Following this within the

	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]

You can add your conditional.

[wpv-conditional if="('[types termmeta='tax-content' output='raw'][/types]' ne '')"]

[wpv-post-read-more item="$current_page"] // This is for the read more button

[/wpv-conditional]

Please try this and let me know if it helps.

Thanks,
Shane