Skip to main content

Conditionals in Pinegrow for WordPress

Conditionals in Pinegrow for WordPress

In today’s video, we are going to take a simple login button and show how we can use conditions to change it button to a “My Account” button if the user is logged in.

YouTube video

To do that, we need to determine whether the user is logged in, and if so, hide the “log in” button and show the “my account” button. Luckily, Pinegrow comes with over 70 built-in conditionals that you can use inside your theme or blocks. To make it even more interesting, most of these conditionals have extra options that you can specify so that you can group them, check if a condition is NOT met. Taking it one step farther, Pinegrow also lets you write your own conditionals for anything that they might not have included. You can even use operators such as OR, AND, or ELSE to to fine tune your conditions.

Recent Posts

  • Using Sass with Pinegrow

    I recently had someone ask whether Pinegrow supports Sass, so I thought I’d do a quick video demonstration. In this demo, I show you how we activate our Sass stylesheet and how we can use a simple Sass variable to change the color of a heading.

  • Pinegrow Countdown: Day 1 – Pinegrow Plays Nice with Others

    A lot of products in the WordPress space have grown in popularity, primarily because of their open and flexible ecosystem that allows 3rd party developers to create add-ons, extensions, and libraries. Pinegrow also has a great plugin API. But I’m going to show you in this video, that in most cases, you don’t even need it.

  • Pinegrow Countdown: Day 2 – Pinegrow is STILL not a Page Builder

    In this video, I’m going to show you why Pinegrow is different from Page Builders so you don’t fall into the trap of trying to use it like something it’s not, only to get frustrated and give up.

  • Pinegrow Countdown: Day 3 – Frameworks in Pinegrow

    Pinegrow has built some fantastic helpers for popular frameworks. In fact, when you start a new project in either Pinegrow Desktop or the Pinegrow WordPress plugin, you’ll be asked which framework you want to choose. If you are already used to using one of the built-in frameworks, the choice will be easy. If not, this little video will hopefully help you understand what the frameworks do and how you should answer those important initial questions.

  • Pinegrow Countdown: Day 4 – WordPress Blocks and Themes

    When you start a new WordPress project in Pinegrow, one of the first things you’ll need to decide is whether you will create a Block Plugin or a complete theme. In this video, I’ll help you understand their differences so you can start on the right foot.