Template Conditions

Template conditions allow you to control when a template is applied. Unlike locations, Template conditions allow logical combinations using AND and/or OR logic, which makes them incredibly flexible.

Here’s a brief overview of the condition types available for Breakdance templates and how they work:

  • Singular
    • Post: Apply the template based on whether the post is or is not one of a given list of posts.
    • Post Parent: Apply the template based on the currently viewed post’s parent.
    • Has Taxonomy: Apply the template based on whether the currently viewed post has a specified taxonomy or taxonomies.
    • Post ID: Apply the template based on whether the currently viewed post’s ID is or is not a specificied post ID.
    • Post Status: Apply the template based on the currently viewed post’s status.
    • Comments Number: Apply the template based on how many comments the currently viewed post has.
    • Author: Apply the template based on the author of the currently viewed post.
    • Featured Image: Apply the template based on whether the currently viewed post has a featured image or not.
  • User
    • User Logged In Status: Apply the template based on whether the user is logged in or not.
    • User Role: Apply the template based on the user’s role (e.g., Subscriber, Contributor, Author).
    • User Registration Date: Apply the template based on when the user registered on the site.
  • Other
    • Dynamic Data: Apply the template based on dynamic data generated by other plugins or functionalities.
    • Custom PHP: Apply the template using custom PHP conditions or functions.
    • Browser: Apply the template based on the user’s browser (e.g., Chrome, Firefox, Safari).
    • Operating System: Apply the template based on the user’s operating system (e.g., Windows, macOS, Linux).
  • Date & Time
    • Day Of Week (WordPress): Apply the template based on the current day of the week according to your WordPress site’s settings.
    • Current Time (WordPress): Apply the template according to the current time according to your WordPress site’s settings.
    • Current Date (WordPress): Apply the template based on the current date according to your WordPress site’s settings.
    • Post Date: Apply the template based on the publishing date of a post.
    • Post Modified Date: Apply the template according to when a post was last modified.
    • Current Month (WordPress): Apply the template based on the current month according to your WordPress site’s settings.
  • Referrer
    • Referrer URL: Apply the template based on the URL the user came from.
    • Referrer Type: Apply the template depending on the type of referring source (e.g., search engine, direct link, social media).
  • Sessions
    • Page View Count: Apply the template based on the number of pages a user has viewed during their session.
    • Session Count: Apply the template according to the number of sessions a user has had on the site.