Displaying a Single WordPress Post - Tutorial 17

In the previous lessons, we learned how to display a list of records and add a thumbnail to them., and in this lesson we will learn, how to display the full record for the user.

To display the full record in the template, you need to create a file single.php at the root of your template.

Copy code from file archive.php to file single.php. Let's modify the code a bit and change the function the_excerpt() on the_content().

Next, go to the admin panel in our post and add the tag further after the first paragraph, as shown in the picture.

wordpress добавление тега далее

Place the cursor in the text and click the button to insert the next tag, then update the record.

After simple manipulations on the output, we will see the following:

B template archive records archive.php

archive.php template output

In the full post template single.php

template wordpress single.php

That's all, short lesson, but i think it's useful. Next, we'll talk about, how to display widgets in the sidebar and how to display post categories in them.


Buy WordPress hosting
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

2 Responses

  1. Mark Komarov says:

    Thanks for the detailed review., this is just what I need!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal