• About
  • Archives
  • FAQ
  • Blog
  • Facebook
  • Forum
  • Twitter
  • Contact
  • Home
  • Articles
    • Affiliate Marketing
      • Affiliate Networks
      • Affiliate Programs
      • Google Adsense & More
      • Merchants & Managers
    • Build Your Site
      • Blogging
      • Design Tips
    • Content is King
    • Find Your Niche
    • Get Traffic
      • Article Marketing
      • Email Marketing
      • Pay Per Click Advertising
      • Search Engine Marketing
      • Social Networking
      • Video Marketing
    • Learn to Sell
    • Manage Your Money
    • Other Bizops & Jobs
    • Sell Your Own Product
    • Success Tips
    • Videos
  • Beginners
  • News
  • Polls+
    • Contests
    • Just for Fun
    • Polls
    • Ros' Personal Notes
  • Resources
    • Deals & Discounts
    • Tools
      • Affiliate Tools
      • Content & PLR Sources
      • Datafeed Tools
      • Keyword Tools
      • List Building Tools
      • PPC Tools & Services
      • Productivity Tools
      • Site Tools
    • Training
      • Ros' Speaking Agenda
      • Seminars & Webinars
      • Tutorials
  • Reviews
  • Tags
    Written by Rosalind Gardner  

    Print Print  Email Email  7 Comments

    Create a Unique Site Map for Your Wordpress Blog

    Daniel recently asked the following question about Wordpress blog site maps, and the site map created for use on this blog in particular:

    I have a question about the NetProfit’s sitemap, that I see is also being used as a 404 not found page. Was the sitemap created manually or by using some type of an automated system or sitemap generator? Cause if I can, I’d like to create one for my website? Please advise. I’d appreciate it. Thanks in advance!

    The site map on this blog was created with some minor manual modifications to the default site map that came with the Lifestyle theme, a file named page-archive.php.

    The  site map that comes with the default Wordpress theme is called the Archive Page Template and the file is named archives.php.

    Here is the coding in the default Wordpress template.

    <?php
    /**
    * @package WordPress
    * @subpackage Default_Theme
    */
    /*
    Template Name: Archives
    */
    ?>

    <?php get_header(); ?>

    <div id=”content”>

    <?php get_search_form(); ?>

    <h2>Archives by Month:</h2>
    <ul>
    <?php wp_get_archives(‘type=monthly’); ?>
    </ul>

    <h2>Archives by Subject:</h2>
    <ul>
    <?php wp_list_categories(); ?>
    </ul>

    </div>

    <?php get_footer(); ?>

    Here is the coding for the current NPT site map, named site-map.php. Coding  will be deciphered later in this post.

    <?php
    /*
    Template Name: Site Map
    */
    ?>

    <?php get_header(); ?>

    <div id=”content”>

    <div id=”contentleft”>

    <div>

    <?php include(TEMPLATEPATH.”/breadcrumb.php”);?>
    <h1><img src=”http://www.netprofitstoday.com/images/300-map.png”   style=”float: right; padding: 0px 0px 10px 10px”  border=”0″>Archives and Site Map</h1>
    <h2>Main Pages</h2>
    <ul>
    <?php wp_list_pages(‘title_li=&depth=2&exclude=2938,1683′); ?>
    </ul>
    <h2>Popular Posts</h2>
    <ul>
    <li>
    <?php wp_list_bookmarks(‘title_li=&categorize=0&category=831′); ?>
    </li>

    </ul>

    <hr>
    <h2>Last 25 Posts</h2>
    <ul>
    <?php wp_get_archives(‘type=postbypost&limit=25′); ?>
    </ul>

    </div></div></div>

    <?php include(TEMPLATEPATH.”/sidebar.php”);?>

    </div>

    <!– The main column ends  –>

    <?php get_footer(); ?>

    Main Pages

    To list all the pages on your blog, you would use the code:

    <?php wp_list_pages('title_li='); ?>

    Because I wanted to show subpages (depth) and not show (exclude) others, I used the following code:

    <?php wp_list_pages(‘title_li=&depth=2&exclude=2938,1683′);

    depth=2 specifies that I want the subpages to show 2 levels deep.

    For more information about visit the Template Tags/wp list pages page on the Wordpress Codex.

    Popular Posts

    The list of most popular posts is generated by a links (bookmarks) list, all filed under the ‘Popular’ category, numbered 831.

    <?php wp_list_bookmarks('title_li=&categorize=0&category=831'); ?>

    For more information about the coding used to display bookmarks, see Template Tags/wp list bookmarks on the Codex.

    Last 25 Posts

    To create a list of the most recent 25 posts, I use the following code.

    <?php wp_get_archives(‘type=postbypost&limit=25′); ?>

    To learn more about coding bookmarks lists visit Template Tags/wp get archives on the Wordpress Codes.

    Or, you could always just use a site map plugin, but you won’t have the same latitude as you do when you hardcode the template. :-)

    Rosalind GardnerWant more info?

    Rosalind Gardner is a Super Affiliate blogger, author, speaker, and Internet marketing consultant.

    If you enjoyed this article and want to be notified the next time Rosalind writes something, subscribe to her RSS feed or the No-Hype, No-BS, No Spam NPT newsletter. You can also follow her on Twitter and Facebook. Thanks for visiting!


    Related Posts

    1. Wishlist Member Review: How to Turn Your Wordpress Blog into a Membership Site
    2. How to Get Rid of the Lifestyle Theme Sidebar Blogroll
    3. Test Your Blog Offline: Install Wordpress on Your PC
    4. How Do I Connect My Site and My Blog?
    5. Where to Find Professional Wordpress Themes

    Posted / Revised on November 19, 2009 under Design Tips
    Tags: blog, site map, Wordpress

    Comments

    7 Responses to “Create a Unique Site Map for Your Wordpress Blog”
    1. Jeffery Wood says:
      Thursday, November 19, 2009 at 13:29 pm

      I may just stick with plugins myself for now. I have enough on my plate right now without learning php, but it’s great to know this information is here for in the future when I’ll need it.

      – Jeffery

      Reply
    2. MK (Casey) van Bronkhorst says:
      Thursday, November 19, 2009 at 15:03 pm

      For those of us who break out in hives at the mere sight of a PHP tag, there’s Table of Contents Creator, which you could see in action at http://www.pswsc.com under Customer Care as Site Directory.

      I say “could” as I don’t know what the policy is for placing links. Ros, if you want to take that one out, I’ll completely understand!

      Reply
      • Rosalind Gardner says:
        Thursday, November 19, 2009 at 18:24 pm

        Hi Casey,

        Where did you find the Table of Contents Creator creator? Is it a plugin?

        Cheers,
        Ros

        Reply
    3. Richard Eaton says:
      Thursday, November 19, 2009 at 18:57 pm

      Thanks Ros for all the great tips and helps you offer on your site. I think you are one of the best friends and resource a marketer could have on the net.

      keep the faith,

      Richard

      Reply
    4. Matt Belcher says:
      Tuesday, November 24, 2009 at 14:39 pm

      Hi Ros,

      When you mention “latitude” how much do you think you get? I mean does this really make a difference?

      I use the google sitemap generator but would be willing to try the suggestion in your post if it really make a difference?

      M

      Reply
      • Rosalind Gardner says:
        Thursday, November 26, 2009 at 11:32 am

        Hi Matt,

        By ‘latitude’ I guess I really meant flexibility. You can do so much more when you hardcode, as opposed to when you use a plugin.

        Hope that helps!

        Cheers,
        Ros

        Reply
    5. Paul says:
      Thursday, November 26, 2009 at 15:58 pm

      Just a little add-on to this Ros…

      “Or, you could always just use a site map plugin, but you won’t have the same latitude as you do when you hardcode the template.”

      It shouldn’t actually be one or the other… you should really do both as each of them serve a different purpose. You can’t submit the hardcoded version to Google Webmasters, Yahoo etc. as a sitemap in the same way as you can with the one that the XML sitemap generator creates. The latter is actually more important, so you should do both.

      ~ Paul

      Reply

    Speak Your Mind

    Tell us what you're thinking...
    and oh, if you want a pic to show with your comment, go get a gravatar!
    Click here to cancel reply.

    Subscribe to Rosalind Gardner's Internet Marketing NewsFREE Subscription

    Recommended

    The Super Affiliate Handbook

    Quick Links

    Menu

  • About Rosalind Gardner
  • Books by Ros
  • Common Questions and Answers
  • Consultations (1-Hour)
  • Consultations (10-minute)
  • Free Newsletter
  • Glossary of Terms
  • Site Archives
  • Speaking Agenda
  • Support
  • Categories

    • Categories
      • Articles (677)
        • Affiliate Marketing (255)
          • Affiliate Networks (16)
          • Affiliate Programs (77)
          • Google Adsense & More (20)
          • Merchants & Managers (26)
        • Build Your Site (117)
          • Blogging (48)
          • Design Tips (35)
        • Content is King (26)
        • Find Your Niche (63)
        • Get Traffic (142)
          • Article Marketing (13)
          • Email Marketing (18)
          • Pay Per Click Advertising (39)
          • Search Engine Marketing (11)
          • Social Networking (29)
          • Video Marketing (5)
        • Learn to Sell (10)
        • Manage Your Money (9)
        • Other Bizops & Jobs (28)
        • Sell Your Own Product (12)
        • Success Tips (62)
        • Videos (12)
      • Beginners (54)
      • News (73)
      • Polls+ (67)
        • Contests (12)
        • Just for Fun (12)
        • Polls (6)
        • Ros' Personal Notes (34)
      • Resources (260)
        • Deals & Discounts (8)
        • Tools (80)
          • Affiliate Tools (7)
          • Content & PLR Sources (21)
          • Datafeed Tools (6)
          • Keyword Tools (10)
          • List Building Tools (4)
          • PPC Tools & Services (4)
          • Productivity Tools (7)
          • Site Tools (20)
        • Training (156)
          • Ros' Speaking Agenda (26)
          • Seminars & Webinars (83)
          • Tutorials (58)
      • Reviews (33)

    Popular

  • CMS, Blogs, Websites & Website Builders
  • Cut Your Writing Time in Half
  • It's GOOD to Be a Thin Affiliate
  • 11 Ways to Make Money Online
  • Recession-Proof Products for Affiliates
  • Overcome Writer's Block
  • How to Sell WITHOUT Selling
  • Recommended

  • Autoresponder Services
  • Content Suppliers
  • FREE Blog Setups
  • Site Hosting Services
  • Super Affiliate Training
  • Website Builders
  • Wordpress in a Day
  • Wordpress Themes
  • Follow Ros

    For quick news updates, follow Ros on Twitter, Facebook

    • Recent Posts

      • Train Your Affiliate Managers Better
      • Clickbank’s New and Improved Marketplace Search Functionality
      • My Affiliate Summit West 2010 Highlights
      • Affiliate Summit West 2010: Video Presentation Summary
      • Revised Launch Date for Affiliate Blogger Pro

    Copyright © NetProfitsToday.com 2009 · All Rights Reserved
    · Terms of Use · About · Books · Services · Contact·

    This blog is powered by StudioPress themes for Wordpress and Aweber