Support » Fixing WordPress » Display a Post Number instead of the Post Date

  • Display a Post Number instead of the Post Date – any idea how to do this?

    I don’t care if it’s the D/B number, my client just doesn’t want the date to show.

    Is there a way to turn the date off totally?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You’ll likely have to edit whichever PHP file is being used to display this post info (single.php? loop.php?) and either remove the variable call completely or just use another one of the post_vars like post->ID.

    Display a Post Number instead of the Post Date

    Within the Loop: <?php echo $post_ID;?>

    Is there a way to turn the date off totally?

    Yes – start editing your theme’s template files and removing references to <?php the_date();?> and/or <?php the_time();?>

    Thanks, Triple P >>

    I tried the code from your link, but it is frustratingly not clear exactly how to place this in the functions.php file (for the theme, correct?)

    I guess I will have to go to my clients theme (iTheme) page and see if they know how to do this.

    Do you know what the author means here? Where do I place this code? At the end of the theme’s functions.php or in some other file?

    anywhere you want to display this post number, use the following line:

    <?php echo get_post_meta($post->ID,'incr_number',true); ?>

    Thanks again for the reference.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display a Post Number instead of the Post Date’ is closed to new replies.