-
TWarrior
Hello,
We have a CPT called ‘companies’
The CPT has a taxonomy called ‘company_directory’ with possible values “directory_a” and ‘directory_b’
Based on this value, we distinguish between two types of business directories: Directory A and Directory B
We need a button to appear on each company’s individual profile page with a link to the “Directory A” page, but it should only be visible if the company has the value “directory_a” in the “company_directory’ taxonomy.
(or something similar…)
-
George
Hello.
Should the button link to a fixed page (e.g. /directory-a/), or to the taxonomy term archive?
-
TWarrior
Hello,
Should be a button to a fixed page (e.g. /directory-a/)
-
George
Hi there,
You can do this with a Button block placed inside your single company template (Block Element → Content Template, or wherever you’re outputting the single company layout), and then use GenerateBlocks Pro Conditions on the Button block itself.
Create two identical buttons inside the content template, one linking to
/directory-aand one to/directory-b.Create one separate condition for each button.
For A:

For B:

-
TWarrior
Hi, it works!
But I’d like to suggest a small UX improvement for the “Locations” selector in Conditional Blocks.
At the moment, the list of LOCATIONS seems to mix two different kinds of rules under the same label:
1. actual view/location contexts, such as Entire Site, Front Page, Blog, Archives, 404, etc.
2. content properties or relationships, such as Post Categories, Post Tags, Child of, Parent of, etc.Functionally, I understand that all of them are valid display conditions. But from a UX and naming perspective, “Locations” feels precise for the first group and less precise for the second one.
It might be clearer to either:
1. split them into grouped sections, such as “Location or View Context”, “Content Properties”, and “Hierarchy”
2. or rename “Locations” to something broader, like “Context” or “Display Context”This is not a functional issue, just a semantic/UI clarity suggestion.
Best regards
-
George
Hi, I see what you mean, I will let the team know!
- You must be logged in to reply to this topic.