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.
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
In the full post template 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.
/*
- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.
Thanks for the detailed review., this is just what I need!
Glad it was helpful, follow my social media posts. I want to make a full course on development and with a human explanation of each lesson.
My groups in social networks:
https://vk.com/public44234527
https://www.facebook.com/UrokiWordPress
https://twitter.com/info00147372
http://ok.ru/yrokiwordpress
https://plus.google.com/u/0/b/106026944582268240509/communities/115992284947615490176