artisan5
Member
Posted 3 years ago #
How do I replace the php command which shows the date of a post with a command to show an ID or other type of tracking number instead such as Entry 1, Entry 2, etc.? Please include which file and section to place the code, since I'm not great at PHP yet. Many thanks...
You probably have the_date('') or the_time('') already, so you might try in your loop:
`
<?php
echo 'typical post id in the loop '. $post->ID;
?>
artisan5
Member
Posted 3 years ago #
I tried replacing the_time code in the page.php template with the php you're suggesting. I must be doing something wrong because the date is still there under the article header.
Should it look like this?
<?php the_time(__(echo 'typical post id in the loop '. $post->ID;)) ?>
<?php the_time(__(echo 'typical post id in the loop '. $post->ID;)) ?>
should be:
<?php
echo 'typical post id in the loop '. $post->ID;
?>
Related:
Stepping Into Template Tags
Stepping Into Templates
Template Hierarchy
the_time()