Topic RSS
I'm not sure if anybody is in need or wants to add a sitemap to there site. If so here is a php file that will generate one. After adding several hundred products to my site it was neccessary for me to make a sitemap for my website, and figured I would share with others that may find it of use.
Just save the file as sitemap.php and upload to you themes folder. Next go and create a new page and select the page template that this file created "Sitemap". That's it very easy and it will help your customers locate all your pages, and helps with search engines indexing your site.
Here is what it looks like on my site. http://www.stonesthatrock.net/sitemap
/*
Template Name: Sitemap
*/
?>
<?php get_header(); ?>
<div id="content_box">
<div id="content" class="page">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<div class="entry">
<p><strong>All internal pages:</strong></p>
<ul>
<?php wp_list_pages('title_li='); ?>
</ul>
<p><strong>All products:</strong></p>
<ul>
<?php $archive_query = new WP_Query('showposts=1000');
while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> </li>
<?php endwhile; ?>
</ul>
<p><strong>Product added in:</strong></p>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<p><strong>Product Categories:</strong></p>
<ul>
<?php wp_list_categories('title_li=0'); ?>
</ul>
<p><strong>Available RSS Feeds:</strong></p>
<ul>
<li><a href="<?php bloginfo('rdf_url'); ?>" title="RDF/RSS 1.0 feed"><acronym title="Resource Description Framework">RDF</acronym>/<acronym title="Really Simple Syndication">RSS</acronym> 1.0 feed</a></li>
<li><a href="<?php bloginfo('rss_url'); ?>" title="RSS 0.92 feed"><acronym title="Really Simple Syndication">RSS</acronym> 0.92 feed</a></li>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="RSS 2.0 feed"><acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed</a></li>
<li><a href="<?php bloginfo('atom_url'); ?>" title="Atom feed">Atom feed</a></li>
</ul>
</div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>
Exactly where do you place the code? Do you find this themes folder in editor? Could you be more detailed on the exact placement of your code, I am very new to this, 1 month in, as a matter of fact. I find this code very valuable as my site is getting too large also. Piper
Most Users Ever Online: 40
Currently Online:
22 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Member Stats:
Guest Posters: 428
Members: 2252
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 2983
Posts: 16042
Newest Members: Allsed, deleteduser, shanm, slidesketch, jimharrison, vmi
Moderators: Market Admin (5051)
Administrators: Market Admin (5051)

Log In
Register
Home
Offline

