WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] Generate sitemap page with WP E commerce products and custom articles (2 posts)

  1. moodytryme
    Member
    Posted 1 year ago #

    Hi !

    I succeeded into generating a sitemap xml including my products thanks to Google XML Sitemaps and WP Shopping Cart XML Sitemap.

    However, I would like to create a page Sitemap where I can dynamically show the structure of my website. I tried many plugins such as WP Sitemap, Dagon Sitemap, etc. but none of them will show my product pages or custom articles.

    Thanks for your help !

    http://wordpress.org/extend/plugins/wp-e-commerce/

  2. moodytryme
    Member
    Posted 1 year ago #

    Hi !

    Finally I created a template page for the sitemap on my own using query posts and wp list categories.

    If it helps someone :

    - To show all your product categories as a list

    <?php
     $args = array('taxonomy' => 'wpsc_product_category', 'orderby' => 'ID', 'order' => 'ASC', 'style' => 'none', 'child_of' => 15);
     wp_list_categories( $args );
     ?>

    - To show all your product tags as a list

    <?php
    wp_list_categories( array('taxonomy' => 'product_tag') );
    ?>

    - To call all your products

    <?php
     query_posts('post_type=wpsc-product&orderby=title&posts_per_page=-1&order=ASC');
      while (have_posts()) : the_post();
     ?>
    <li><a href="<?php the_permalink();?>" title="<?php the_title() ;?>"><?php the_title() ;?></a></li>
     <?php endwhile; ?>
     </ul>
    	<?php wp_reset_query(); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic