How can I make dynamic fields only appear when a post data is available?

Imagine you have a post slider / query loop showing employees. Some employees have a LinkedIn profile that is to be displayed below their photo and name, some don’t. You would now want your post slider to only display the LinkedIn icon when there is a LinkedIn profile available.

There’s an easy way to do that in Greyd.Suite using our Conditional Content block. Place the block in the post template in your query loop and select “Post meta” as the condition. Then select the post type (in our example “employees”), then select the respective field (in our example that would be “Linkedin”) and define the condition as “is set”.

Screenshot of the condition in the conditional content block, as described in the previous paragraph.

Last updated: