Simple table of contents, it doesn’t need any plugins

blog Tutorial 0 Responses
 

Make simple table of contents in WordPress without plugin is easy. I did not expect it at all. Table of contents called with some other name. Someone using name the sitemap, and others say archives. On vmancer.com I use the word Sitemap for table of contents.

The first step to create simple table of contents is create a php file.
The easiest way is using the page.php file in the template. Copy the file and rename it with new name, such as sitemap example.php.

The second step, edit sitemap example.php.
To display the simple table of contents on your WordPress blog, you can simply use standard code of WordPress. That is wp get archives code, accordance with the code below.

<?php wp_get_archives('type=postbypost'); ?>

Modification of the code can be found on page Function Reference/wp get archives.

simple table of contents

If you use Tricks 2 Reloaded WordPress template, replace the existing code with the code above as shown in the image above. Or click to download the sample file for more details about simple table of contents php file. Not many modifications are made in comparison with the original page.php.

The third, upload sitemap example.php file and place it in the template folder used.
You must login to your blog CPanel hosting to do this. After the upload is complete, create a new Page.

simple table of contents

simple table of contentsFourth, when creating a new Page for simple table of contents, look at the Page Attributes.
On the part of Template, it would seem Sitemap Example. So use that option. After that you just need to fill in Page title and then publish. Sitemap should look like the image below.

The problem I am dealing with is how to divide the list in few pages. If not….. list of simple table of contents will be very long, especially on blogs that have lots of articles.

Please help me if you can, thank you.simple table of contents

How to more easily be obtained with the help of plugin, more details read on article: Table of contents (Blogger and WordPress).

 
     
Oct
30
 
Back to Top Giveaway Cooperation