Using [if] [else] in pods template
-
Hi there!
I’ve been referring to this Pods Documentation article to figure out [if][else] template structure for a CPT called careers.
It all seems to make perfect sense, but my code seems to only display the [else] template part. It does this for each career. So, if I have two careers posted, it shows the “no careers” message twice.
What am I doing wrong? ??
[if career] [each career] <div class="careers" style="width:220px; display: inline-block;"> <h3>{@post_title}</h3> <p style="color: #2c353c;">{@career_type}</p> <p style="padding: 30px 0px;">{@post_excerpt}</p> <a href="{@permalink}" class="more-link;">Apply</a> </div> [/each] [else] <div class="no-careers" style="width:100%;"> <h3>No careers posted at this time</h3> <p style="padding-top: 30px;">We're not actively hiring at the moment, please check back later.</p> </div> [/if]
Displayed on page with shortcode [pods name=”career” template=”Careers”]
Thanks so much in advance for your help.
-LauraThe page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Using [if] [else] in pods template’ is closed to new replies.