Skip Navigation

[Closed] Conditional Display Based on Taxonomy NOT Being Empty

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.

Our next available supporter will start replying to tickets in about 4.97 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

This topic contains 19 replies, has 3 voices.

Last updated by Waqar 1 year, 8 months ago.

Assisted by: Waqar.

Author
Posts
#2553975

Tell us what you are trying to do?

I want to display a field if a taxonomy field is not empty. I have a taxonomy named "Broker Services", with slug "broker-services".
I am using the advanced editor for a conditional block with the following:
NOT ( empty( '[wpv-post-taxonomy type="broker-services" format="slug" ]') )

I know that the taxonomy is not empty, but the fields in the conditional block are not visible. How do I correct this?

Is there a similar example that we can see?
I use this conditional for a taxonomy on the same content template, and it works right.
NOT ( empty( '[wpv-post-taxonomy type="state" format="slug" ]') )

#2554105

Hello,

I have tried it in a fresh WP installation + the latest version of Toolset plugins, it works fine, see blow test site:
Login URL:
hidden link

Test post with conditional block:

 NOT ( empty( '[wpv-post-taxonomy type="broker-services" format="slug" ]') ) 

It works fine in frontend:
hidden link

Can you reproduce the same problem in above test site:
but the fields in the conditional block are not visible.

#2554253

Hello Luo,

I am not clear on what i need to do here. Are you asking me to set up the CPT, custom fields, create template and test conditional? I am not a developer and it will take me a while to do this.

Is there another way to do this? Or do I misunderstand?

#2554823

The problem only exists in your website, see the test site I provided above:
hidden link
It is using same condition as you mentioned above, do you have any clue to reproduce the same problem?
You can also provide a test site with the same problem, I need a live website to test and debug this issue.

#2555211

If I provide access to my staging site with the problem, can you check it there?

#2555301

The conditional that is in the content template works as shown here when a single post link is clicked. - hidden link

However, the same content template is used on another page with a view that contains this query filter. The conditional does not work on the page with the view, even though it is the same content template. The other conditional mentioned above works on this page. This is the page, but it will not display the content unless you are the author and logged in. hidden link

Query Options
Don't include the current page in the query result
Query Filters

Post author filter

Select posts with the author the same as the current logged in user.

#2555441

Private message box enabled, please provide your staging website credentials in it.

#2555545
Services-Offered.jpg

I can login into your website, and tried these:
1) Open URL:
hidden link

Fill value in field "Services Offered" and submit the form,

2) Open above URL again, I can see it works fine:
hidden link
See my screenshot Services-Offered.JPG

Is there any missing steps?
Please provide detail steps to reproduce the same problem:
but the fields in the conditional block are not visible.

#2555803

When I open the URL, the Services Offered headings and taxonomy terms are not visible. Also, the Areas Serviced heading and States and Provinces headings and taxonomy terms are not visible.

#2556177
Broker-Profile Page.jpg

This is what the page looks like when I click on the link hidden link

Notice the headings and taxonomy terms are not visible as mentioned in previous message.

#2556195
Broker-Profile Page correct.jpg

The page should look something like this. Notice that the headings and taxonomy terms are visible.

Both of these use the same content template.

#2556243

Which user are using using to login into your website?
Since you are using author filter in the post view:
Post author is same as logged-in user, so different user will see different result

Can you login into your own website with the user "Toolset" you provide above?

#2556257

why does this matter? I understand that I will only see the post if I am the logged in author. that is what I want, as I am logged in and i am the author. The problem is that the fields with the conditionals are not visible for the content template that is contained in the post view.

#2556301

This is set up so that the author can see their own post and edit it. they should be able to see all fields, even the one with the taxonomy conditionals, right?

#2556317

Is it possible to get this case assigned to someone with a similar time zone to me?

I have to go to bed now. We are on opposite sides of the world. this means we only exchange one or two messages per day. it has been an entire week and almost no progress has been made. I think this would go faster if there was someone that I could communicate with several times per day.

let me know if this can be done.

thank you.

The topic ‘[Closed] Conditional Display Based on Taxonomy NOT Being Empty’ is closed to new replies.