Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

veggieboy516 on "Pods setup template boolean code help"

$
0
0

Hi!

I'm trying to incorporate an if statement into the code in the Pods=>Setup=>Template part. Goal if value is false, display.

Under Pods=>Setup=>Pods, I've added column with the column type boolean. Called it noquestion. In my case, check the box if there are no questions. Box checked => value true; there are no questions, don't display option of clicking on question. If box not checked => value false, display option of clicking on question

Here's part of the code in the Pods=>Setup=>Template:

<a href="{@manuscript}" target="blank" alt=" " title="Download the manuscript."> <img class="sermon_img" src="<?php bloginfo('template_url'); ?>/images/sermons_download_arrow.png"></a>
<a href="{@questions}" target="blank" alt=" " title="Download the discussion questions."><img class="sermon_img" src="<?php bloginfo('template_url'); ?>/images/sermon_q_download_arrow.png"></a>
<a href="{@link_to}" alt="Save sermon audio." title="Save sermon audio."><img class="sermon_img" src="<?php bloginfo('template_url'); ?>/images/sermons_save_disk.png"></a>

I'm trying to get the middle section into the if statement:

<a href="{@questions}" target="blank" alt=" " title="Download the discussion questions."><img class="sermon_img" src="<?php bloginfo('template_url'); ?>/images/sermon_q_download_arrow.png"></a>

I thought I'd try:

if(@noquestion==0){<a href="{@questions}" target="blank" alt=" " title="Download the discussion questions."><img class="sermon_img" src="<?php bloginfo('template_url'); ?>/images/sermon_q_download_arrow.png"></a>;}

or some variation of that it would work, but none of variations I tired work. The if statement just pops up on the website.

First time looking for help on forums, hope I got everything; thanks for your time/offer to help.


Viewing all articles
Browse latest Browse all 8245

Trending Articles