December 2017
Beginner
458 pages
7h 52m
English
Next, we will add the metadata. Let's put that in a paragraph with a class called meta as shown here:
<p class="meta"></p>
In the meta class, we will add Posted at and then get the date and time. To get the date and time, we will add <?php the_time(); ?> and <?php the_data(); ?> respectively:
<p class="meta">Posted at <?php the_time(); ?> on<?php the_date(); ?> by</p>
Next, we want to add the user's name, and we will put that in a link. For this, we will add <a href=""> </a>, add the php tag, and echo out get_author_posts_url() as shown here:
<p class="meta">Posted at <?php the_time(); ?> on<?php the_date(); ?> by<a href="<?php echo get_author_posts_url(); ?>"></a></p>
Now, we need to put the ID for the author, which we can ...
Read now
Unlock full access