Thread Starter
miss-d
(@miss-d)
No, no plugin, I’m trying to do this on my own, and I’m still a beginner, so bare with me…
<?php if ($post_status = "future"): ?>
<p style="font-family: Arial; font-size: 14px;">Please be patient until this date :)</p>
<?php else: ?>
<?php while (have_posts()) : the_post(); ?>
<?php echo '<h2 style="font-family: Arial; font-size: 14px; color: #b22222;">';
the_title();
echo '</h2>';
echo '<p>';
the_content();
echo '</p>';
endwhile;
?>
<?php endif; ?>
…this is not working :\ but I’m a real greenhorn with this all.
Thanks for any help!!
first it’s bad to update wordpress core files everything to be done
with a plugin
second what does that mean:”clicks on the 24th” press where ? in the calander widget ?
Thread Starter
miss-d
(@miss-d)
Unfortunately there is no plugin that does that for me … it’s an advent calendar using a image rollover map and the plugin “Easy Fancybox” to display the popups in a lightbox windows (one rollover for each day in December… that’s a German thing π
Now I need an if/condition that tells wordpress “if you rollover on #24 and it’s still the 1st od december please give out a msg that you gotta wait till then – you should be able to only open the numbers of current or past dates (I have set all other 23 posts except today to status future)
Thanks yehudah so far for trying to help π
On single.php you can test if a post_status is “future” with this:
<?php
if($post->post_status == 'future') : ?>
<!-- do stuff -->
<?php else : ?>
<!-- do stuff -->
<?php endif; ?>
no problem
i’m sorry but when i help i try to understand the concept but you
lost me.
can you post a link to what you done so far.
Thread Starter
miss-d
(@miss-d)
keesiemeijer you saved my day thanks a lot!!! π – it’s working now (at least in Firefox, IE is not giving out the future post msg): See here:
http://www.lebensberatung-ce.eu/adventskalender-2011
This is my code:
<?php
while ( have_posts() ) : the_post(); ?>
<?php
if($post->post_status == 'future') : ?>
<?php echo ' <p style="font-family: Arial; font-size: 14px;">Bitte noch ein wenig Geduld für dieses Türchen :)</p>' ?>
<?php else : ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php endif; ?>
<?php endwhile; ?>
Thank you guys π