Freelance web designer

How to create custom sitemap page

How to create custom sitemap page

on Feb 15, 2011 in tutorial, web design, wordpress | 1 comment

In my opinion, one important element in your website / blog is the sitemap. sitemap is a navigation function to allow users easily to explore at your website.

Whereas according to wikipedia,  a sitemap is a list of pages of a web site accessible to crawlers or users. It cans be Either a document in any form Used as a planning tool for web design, or a web page That lists the pages on a Web site, typically organized in hierarchical fashion. This helps visitors and search engine bots find pages on the site.

Then …. How to create custom sitemap page with a sitemap, what anything to do with me …?

Yupe… of course, because the sitemap page at freecmstheme not display the last article. This is indeed trivial, but …. because I believe that “the visitor is king” and I would like “the king liked the page that“, therefore I tried to fix it. I want the user to easily browse with additional navigation.

If you want to display a list of articles in the sitemap like last archive page. you simply add the code below in sitemap.php

<div id="archive" style="padding-bottom: 12px; padding-top: 12px;">
 <h3 style="border-bottom: 1px solid #ECECEC;">The Last 30 Posts</h3>
 <ul>
 <?php query_posts('showposts=30'); ?>

 <?php while (have_posts()) : the_post(); ?>
 <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a>, <?php the_time('F j, Y'); ?> ( <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> )</li>
 <?php endwhile;?>
 </ul>
 </div><!--end-of-archive-->

To regulate the amount you want to display a list of articles, you simply replace “showposts=30″ with “showposts=10″ or more. Good luck.

NOTE :

  1. I use the already available themes sitemap.php file. If you do not have a sitemap.php file in yout themes, please find a tutorial to make sitemap.php on google.
  2. Please backup your theme first, which errors occur is not my responsibility.
  3. If you have questions, please give it in the comments box.

    1 Comment

  1. Thanks so much for this! I have not been this thrilled by a blog post for quite some time! You’ve got it, whatever that means in blogging. Anyway, You’re definitely someone that has something to say that people should hear. Keep up the wonderful job. Keep on inspiring the people!

    Research papers

    May 16, 2012

Trackbacks/Pingbacks

  1. Blog Affiliate Strategy - Blog Affiliate Strategy - A quick overview!... [...This trackback notifies you of the usage of...]...

Post a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

eXTReMe Tracker