The {is_starred} Merge Tag
Added in GravityView 2.14, the {is_starred}
Merge Tag will show whether an entry has been.
- If an entry is starred,
{is_starred}
is replaced with1
. - If an entry is not starred,
{is_starred}
is replaced with0
.
How to show different content based on whether an entry is starred
Sometimes you want to know whether an entry has been starred when using the [gvlogic] shortcode.
Using the [gvlogic]
shortcode, you don't need to add anything more than the "if" statement:
[gvlogic if="{is_starred}"]
🤩 This entry is starred!
[else]
🙁 This entry is not starred
[/gvlogic]
Here's how to show content that will appear if an entry is starred, but no content will appear if it is not:
[gvlogic if="{is_starred}"]⭐️ This entry is starred![/gvlogic]