Skip Navigation

[Resolved] How to set up block which will be shown conditionally everywhere?

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

Problem:
How to set up block which will be shown conditionally everywhere?

Solution:
You can use the [wpv-conditional] shortcode to display the conditional output.

You can find the proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/how-to-set-up-block-which-will-be-shown-conditionally-everywhere/#post-1197120

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

This support ticket is created 5 years, 10 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Author
Posts
#1196875

BV

I'm using Astra + Toolset (without Layouts) for my directory. I want to show 2 content blockы as a part of header (or under header):
- breadcrumbs - at every page of site, including home page and wp blogposts/pages
- my custom ads - conditionally, at home page and some posttypes + posts/pages (actually, I want to disable it only at several pages only)

Also I want to add 2 js blocks to the html header.

How I can perform it with a help of Toolset?

#1197120

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Toolset is not controlling the header, footer or sidebars but it will have an impact on the body part (the_content()) part.

Here is the Doc how you can use Astra theme with Toolset:
https://toolset.com/documentation/recommended-themes/using-toolset-with-astra-theme/

As Astra theme is integrated with Toolset - you can control the theme options it offer (show/hide/change):
=> https://toolset.com/documentation/recommended-themes/using-toolset-with-astra-theme/#controlling-astras-theme-options-for-templates-and-archives

- breadcrumbs - at every page of site, including home page and wp blogposts/pages
==> I think you are looking for this: hidden link

- my custom ads - conditionally, at home page and some posttypes + posts/pages (actually, I want to disable it only at several pages only)
==> I need exact information what field you want to dispaly conditionally exactly where. Toolset offers you [wpv-conditional] shortcode that can help you to display content conditionally.

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

#1197343

BV

My issue is resolved now. Thank you!