Changing post based on Tag
-
Hello,
I am new to WP development and currently am creating my own custom theme. I need to write a sinmple conditional statement but failing miserably!
Basically, I need a post to change if it has a tag named “Sold”. So I have a post, if the tag “Sold” is applied, the generated post would be something like:
<h2><?php echo get_post_meta($post->ID, 'dayofmonth', true) ?></h2>
In any case where the tag sold is not applied, the post would be:
<h4>$<?php echo get_post_meta($post->ID, 'amount', true) ?></h4>
Any ideas? Thanks so much!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Changing post based on Tag’ is closed to new replies.