Skip Navigation

[Resolved] Display conditional shortcode on User Profile type based on type view

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


I need to output a link based on the comparison of the usermeta and wpv-found-count.


You can setup [wpv-conditional] shortcode like this:

Relevant Documentation:

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.

This topic contains 2 replies, has 2 voices.

Last updated by MargeP6083 2 months, 2 weeks ago.

Assigned support staff: Luo Yang.


I am trying to output these 3 Notice Post Type items via block on User profile type post. (View with Select posts with the author the same as the current logged in user.) Number 1 doesn't output anything (block editor or output editor). Items 2 and 3 can output via Output editor only, which is fine. I need to output a link based on the comparison of the usermeta and wpv-found-count.

I'm using this guide:

1. [wpv–conditional if="('[wpv-found-count]' lt '[types usermeta='notice-post-number' format='FIELD_VALUE' current_user='true'][/types]')"]Click this link to Post a Notice[/wpv–conditional]
2. Total Credits Purchased: [types usermeta='notice-post-number' format='FIELD_VALUE' current_user='true'][/types]
3. Total Credits Used: [wpv-found-count]

----------------------Loop Editor---------------------
[types usermeta='notice-post-number' format='FIELD_VALUE' current_user='true'][/types]
<!-- wpv-loop-start -->
<!-- wpv-loop-end -->

What is the link to your site? hidden link

How can I show the result of the conditional comparison?
Is the Output editor the only way do do this?

Thank you!


Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)



Please try to modify the [wpv-conditional] shortcode as below:

[wpv-conditional if="( '[wpv-found-count]' lt '[types usermeta="notice-post-number" format="FIELD_VALUE" current_user="true"][/types]' )"]
Click this link to Post a Notice

You can put above codes into view's section "Loop Editor", between shortcodes [wpv-layout-start] and [wpv-items-found].

See my screenshot Loop-Editor.JPG


My issue is resolved now. Thank you!