Conditional Display

Headers and Footers can be applied conditionally based on one or more variables, such as whether a user is logged in or out, the user’s role, browser, operating system, and much more.

To apply conditions to a Header or Footer, first navigate to the appropriate area in the WordPress admin panel and click “Settings” under the Header or Footer that you want to edit.

In the settings modal, you’ll see an “+Add Condition” button. Click this to add a conditional display rule to the Header or Footer.

To add multiple conditions using AND logic, click the “AND” button to the right of a condition.

To add multiple conditions using OR logic, click the “+Add Condition” button again to create an OR group.

Condition Types

Below are the condition types that are available for Headers & Footers, along with a brief explanation of how they work.

  • User
    • User Logged In Status: Determine the visibility based on whether the user is logged in or not.
    • User Role: Control visibility based on the user’s role (e.g., Subscriber, Contributor, Author).
    • User Registration Date: Display or hide the Header/Footer based on when the user registered on the site.
  • Other
    • Dynamic Data: Show or hide the Header/Footer based on dynamic data generated by other plugins or functionalities.
    • Custom PHP: Determine visibility using custom PHP conditions or functions.
    • Browser: Control visibility based on the user’s browser (e.g., Chrome, Firefox, Safari).
    • Operating System: Display or hide the Header/Footer based on the user’s operating system (e.g., Windows, macOS, Linux).
  • Date & Time
    • Day Of Week (WordPress): Display the Header/Footer based on the current day of the week according to your WordPress site’s settings.
    • Current Time (WordPress): Control visibility according to the current time according to your WordPress site’s settings.
    • Current Date (WordPress): Show or hide the Header/Footer based on the current date according to your WordPress site’s settings.
    • Post Date: Determine visibility based on the publishing date of a post.
    • Post Modified Date: Display or hide the Header/Footer according to when a post was last modified.
    • Current Month (WordPress): Control visibility based on the current month according to your WordPress site’s settings.
  • Referrer
    • Referrer URL: Display the Header/Footer based on the URL the user came from.
    • Referrer Type: Control visibility depending on the type of referring source (e.g., search engine, direct link, social media).
  • Sessions
    • Page View Count: Show or hide the Header/Footer based on the number of pages a user has viewed during their session.
    • Session Count: Determine visibility according to the number of sessions a user has had on the site.