Debugging Conditional Output

To get your conditional output to display correctly, you might need to enable the debug output. When you enable debug output, the site administrators will see the debug information on the site’s front-end. Using the debug mode Let’s see an example of how debug mode can help you identify problems. Can you tell what’s wrong […]

Using Custom Functions in Conditions

Toolset allows you to display content conditionally. This includes evaluating conditions based on your own custom functions. Before using a function inside a conditional, you need to register it for security reasons. Even WordPress functions need to be registered. To do so, visit the Toolset → Settings page and click the Front-end Content tab. There, simply add your […]

Using shortcodes in conditions

Using Views shortcodes You can use some of the Views shortcodes in the if-expression of the wpv-conditional shortcode. This allows you to use conditional logic on the output you get from those shortcodes. The list of all Views shortcodes that can be used in conditional statements is available in the Conditional output dialog when you […]

Displaying taxonomies conditionally

In the examples that follow we will use a custom taxonomy called “Foreign language” defined with the Types plugin. This taxonomy is assigned to the Consultant custom post type: Checking if a post has at least one term assigned Use the wpv-post-taxonomy shortcode to test if a post has at least one term assigned. The […]

Checking fields and other elements for Empty/Non-empty Values

There are several ways of testing a field (or a shortcode) for empty/non-empty value: #1 – Using the empty() function You can check a field for for an empty value using the Views empty() function In case you want to check if the field is not empty, you can add the NOT operator in front […]

Conditional HTML Output in Views

Conditional HTML output, in the Views plugin, lets you display sections according to logic conditions. This is similar to if/else statements in programming languages, just without having to write PHP. When using very long content with the conditional shortcode you might encounter an error. Since Views uses native WordPress parsing for all shortcodes, this limitation […]

Customizing cluster markers by using Javascript functions

Using Toolset Maps you can group together close-by markers on a map into clusters. Clusters are represented by a single, cluster icon on a map, and when you zoom into the map view, individual markers are shown on the expanded map area. Toolset Maps also allows you customize the cluster options, for example, how many […]

Infinite Scrolling for WordPress Content

Infinite scrolling allows more content to be displayed automatically, as visitors scroll down a page. With infinite scrolling, readers get the feeling that the page is endless. You can add infinite scrolling to your sites, as part of the pagination feature. How to add infinite scrolling to your content To be able to add infinite scrolling […]

How to Use Views Custom Search on Large Sites

The Views plugin provides a caching mechanism that allows Views with long queries to be rendered faster, since the whole output is stored in the database. There are a lot of tools and options available in Views that facilitate the building of complex queries, in order to produce the desired output. Sometimes, the execution of […]

Theme Frameworks Integration

You can control Views settings using option screens. This is useful when you develop Toolset-based themes and you want to create option screens that determine what displays in different places. In this document, we describe the API, which allows you to declare your option frameworks.. Here are some examples of what you can achieve with […]