Tell us what you are trying to do?
I have CPT archiv page "Books" - hidden link, filtering by taxonomy "Genre".
I need similar archive, which only displays taxonomy "Adult" - the rest (filtering by taxonomy"Genre" and sorting by post type "date o publication") from archiv hidden link should stay. The books in this archive page are sorted by date of publication custom post type - this is main reason, why I can´t use simple archive page for taxonomy. If there is any easier solution - please tell me.
Finally, there should be 3 archives:
1/ hidden link - it works now well
2/ hidden link - the same archiv but only for taxonomy "Adult"
3/ hidden link - the same as 1/ but for taxonomy "Childrens"
I'm trying to add a condition you sent me, but I´m doing something wrong - in all cases I only see my old view and parts of code from condition at the start and in at the end on archiv page.
I tried to wrap template for view first, then wrap shortcode on archiv page (I´m using Beaver Builder to create archiv page), I tried wrap Loop in view editor too.
Could you please send me more detail information where put the conditional - or I can send temporary accesses to admin.
Hi Shane,
I prefer in this case Beaver Builder archive solution (via Themer), because I´m used to it and I already did with them other archive pages on this site (hidden link, hidden link.
I´m using Toolset for design View (custom grid with filtering), this View is insert as HTML shortcode to empty archive page. The logic of archive pages is set in Beaver Themer. It will be great, if I can put condition direct inside View.
You perhaps may not be able to get the conditional logic working inside the view since the taxonomy shortcodes need to be in a taxonomy view.
However what you can do is if you are inserting the view using the Oxygen Builder WYSIWYG editor then you would be able to utilize the conditional logic there.
This would mean you will need to create 2 separate views and load the view based on the conditional logic.
Updating the code I had previously provided to match this new logic would look like this.
thanks for your time, unfortunately this solution doesnt work for me. I´m using Beaver Builder (+ Beaver Themer), but I suppose it works like Oxygen editor that you mention.
I tried your code here - hidden link (printscreen of source attached). I tried Wysiwyg component or HTML component - the result was the same.
It seems that the conditional shortcode isn't working on the archive template.
Does Beaver Builder have a conditional block or something of sort ? I would need to verify that the conditionals do not work on Beaver Builder templates.
Would you mind if I grabbed a copy of the site so that I can have a more detailed look at this one ?
Since there is a conditional for Beaver Builder I would suggest opening a ticket with beaver builder to ask them how this works.
Because if you're able to conditionally display the block based on the Archive you are viewing then you can load a different view based on the archive.
This would work just as well, so i would suggest asking them if its possible to display a different block/widget based on the archive that you're on.