WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Having code appear only on posts above a certain ID

[Resolved] Having code appear only on posts above a certain ID

  • I’ve been manually putting an author bio and image at the foot of the content of all posts, but I’d like to automate this. I’ll be putting something like this in my single.php:

    <div id="author-info">
        <div id="author-image">
        	<a href="<?php the_author_meta('user_url'); ?>"><?php echo get_avatar( get_the_author_meta('user_email'), '80', '' ); ?></a>
        </div>
        <div id="author-bio">
            <h4>Written by <?php the_author_link(); ?></h4>
            <p><?php the_author_meta('description'); ?></p>
        </div>
    </div>

    However I don’t want this to appear on older posts, which already have the bio as part of the post content. Is there some kind of conditional statement I can wrap this in that will cause it to appear only on posts with IDs higher, than, say 7396 (the most recent post with the bio manually added).

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Having code appear only on posts above a certain ID’ is closed to new replies.