For example...
I'm trying to make "<div class="read-more">" not appear if the postcount is '1' and appear when the postcount is not '1'. Is it possible to include style tags within the conditional statements (e.g. if blah blah blah <style> blahblah {visibility:hidden;}</style> else blah blah blah <style> blahblah {visibility:visible;}</style>
Please take a look at my code below to (hopefully) get a clearer understanding of what I'm talking about. I've included the style tags but it doesn't seem to be working.
------------------------------------------------------------
<?php if ($postcount == 1) : // if this is the first post ?>
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<style>.read-more{visibility:hidden;}</style>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<?php else : //if this is NOT the first post ?>
<?php the_excerpt(); //show the post as an excerpt ?>
<style>.read-more{visibility:visible;}</style>
<?php endif; //end of the check for first post - other posts?>
</div>
<div class="postmetadata">
<div style="text-align:right;" class="read-more"><a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="more-link">Read more »</a></div>
------------------------------------------------------------
I would really appreciate any help with this!!
I'm trying to make "<div class="read-more">" not appear if the postcount is '1' and appear when the postcount is not '1'. Is it possible to include style tags within the conditional statements (e.g. if blah blah blah <style> blahblah {visibility:hidden;}</style> else blah blah blah <style> blahblah {visibility:visible;}</style>
Please take a look at my code below to (hopefully) get a clearer understanding of what I'm talking about. I've included the style tags but it doesn't seem to be working.
------------------------------------------------------------
<?php if ($postcount == 1) : // if this is the first post ?>
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<style>.read-more{visibility:hidden;}</style>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<?php else : //if this is NOT the first post ?>
<?php the_excerpt(); //show the post as an excerpt ?>
<style>.read-more{visibility:visible;}</style>
<?php endif; //end of the check for first post - other posts?>
</div>
<div class="postmetadata">
<div style="text-align:right;" class="read-more"><a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="more-link">Read more »</a></div>
------------------------------------------------------------
I would really appreciate any help with this!!