i have a wp blog.. i want to create a sitemap page, and when it is clicked, it should display the sitemap.. how to do it?
i don't get you you want to create a link and then the whole site should change or you want something like a dropin comming from a site that contains the sitemap information?
i have a plug-in that creates sitemap.. now, i have the sitemap in the address, say, http://mysite.com/sitemap.xml now, i want to create a page 'sitemap' like the about page.. when the 'sitemap' link is clicked, it should take me to the above mentioned address. this is what i want.. i hope i made it clear this time?
did you try to use <a href="http://mysite.com/sitemap.xml">Sitemap</a> Code (markup): it's the normal code for links in html
@ senseidesign & @ hardcore i use a wp theme.. here's my site http://mobiletimes.in you can see the 'sitemap' link at the top right corner.. it shows an empty page now.. i want it to go to http://mobiletimes.in/sitemap.xml , when clicked.. how do you suggest i do that? help me
this is what the code for the link is right noe <a href="http://mobiletimes.in/sitemap/" title="SiteMap">SiteMap</a> Code (markup): change it to <a href="http://mobiletimes.in/sitemap.xml">SiteMap</a> Code (markup): and it should work. I can't tell you how to do it because I don't know if you can edit it in tha backend or you'll need to edit it in the index.php
great.. here header <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> <title> <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?><?php } ?> <?php if ( is_search() ) { ?><?php bloginfo('name'); ?> | Search Results<?php } ?> <?php if ( is_author() ) { ?><?php bloginfo('name'); ?> | Author Archives<?php } ?> <?php if ( is_single() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?> <?php if ( is_page() ) { ?><?php bloginfo('name'); ?> | <?php wp_title(''); ?><?php } ?> <?php if ( is_category() ) { ?><?php bloginfo('name'); ?> | Archive | <?php single_cat_title(); ?><?php } ?> <?php if ( is_month() ) { ?><?php bloginfo('name'); ?> | Archive | <?php the_time('F'); ?><?php } ?> <?php if (function_exists('is_tag')) { if ( is_tag() ) { ?><?php bloginfo('name'); ?> | Tag Archive | <?php single_tag_title("", true); } } ?> </title> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" /> <?php if ( get_option('woo_centered') ) { ?><link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/centered.css" media="screen" /><?php } ?> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if ( get_option('woo_feedburner_url') <> "" ) { echo get_option('woo_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <!--[if lt IE 7]> <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta2)/IE7.js" type="text/javascript"></script> <![endif]--> <?php wp_enqueue_script('jquery'); ?> <?php wp_head(); ?> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/includes/js/tabs.js"></script> <meta name="verify-v1" content="NfsJXa4ZvIZglGLcnNGQYUV5P+vW6KILK026qT2yGKE=" /> <meta name="blogcatalog" content="9BC9059270" /> </head> <body> <!-- TOP MENU STARTS --> <div id="top-menu-out"> <div id="top-menu"> <ul> <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?> first"><a href="<?php bloginfo('url'); ?>">Home</a></li> <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> </ul> </div> </div> <!-- TOP MENU ENDS --> <!-- HEADER STARTS --> <div id="header-out"> <div id="header-bg"> <div id="header"> <div class="col-left"> <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>"> <img src="<?php if ( get_option('woo_logo') <> "" ) { echo get_option('woo_logo').'"'; } else { bloginfo('template_directory'); ?>/images/logo-trans.png<?php } ?>" alt="<?php bloginfo('name'); ?>" /> </a> <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1> </div> <div class="col-right"> <div class="date"><p><?php echo date("l, F jS, Y"); ?></p></div> <div id="search"> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> <div> <label for="search">Search</label> <input type="text" name="s" id="s" /> </div> </form> </div> </div> </div> </div> </div> <!-- HEADER ENDS --> <!-- MAIN MENU STARTS --> <div id="main-menu-out"> <div id="main-menu"> <ul> <?php echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a$2><span>$3</span></a>', wp_list_categories('echo=0&orderby=name&exlude=181&title_li=&depth=1')); ?> </ul> </div> </div> <!-- MAIN MENU ENDS --> <!-- SUB CAT STARTS --> <?php if (is_category()) { $this_category = get_category($cat); } ?> <?php if($this_category->category_parent) $this_category = wp_list_categories('orderby=id&show_count=0&title_li=&child_of='.$this_category->category_parent."&echo=0"); else $this_category = wp_list_categories('orderby=id&show_count=0&title_li=&child_of='.$this_category->cat_ID."&echo=0"); ?> <?php if ($this_category != "<li>No categories</li>") { ?> <div id="subcat-menu-out"> <div id="subcat-menu"> <?php if ($this_category) { ?> <ul class="wrap"> <?php echo $this_category; ?> </ul> <?php } ?> </div> </div> <?php } ?> <!-- SUB CAT ENDS --> Code (markup): index <?php get_header(); ?> <div id="middle-out"> <div id="middle" class="wrap"> <div id="content" class="col-left"> <div class="featured"> <?php $featured = new WP_Query('category_name='.get_option('woo_featured_category').'&showposts=1&order=DESC'); ?> <?php while ($featured->have_posts()) : $featured->the_post(); ?> <?php $GLOBALS['exclude'] = $post->ID; ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <p class="post-details">by <?php the_author_posts_link(); ?> on <?php the_time('d/m/y'); ?> at <?php the_time('g:i a'); ?></p> <?php if ( get_post_meta($post->ID,'image', true) ) { ?> <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD --> <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=<?php if ( get_option('woo_image_height') <> "" ) { echo get_option('woo_image_height'); } else { ?>170<?php } ?>&w=<?php if ( get_option('woo_image_width') <> "" ) { echo get_option('woo_image_width'); } else { ?>350<?php } ?>&zc=1&q=90" alt="<?php the_title(); ?>" class="alignleft" /></a> <?php } ?> <?php if ( get_option('woo_content_feat') ) { the_content(); } else { the_excerpt(); ?><?php } ?> <a href="<?php the_permalink() ?>" class="read-more">Full Story</a> <?php endwhile; ?> <div class="fix"></div> </div> <div id="main" class="wrap"> <div id="latest"class="col-left" <?php if (get_option('woo_popular_posts') == "0"){ ?>style="width:auto;"<?php } ?>> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("paged=$paged"); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); $count++; ?> <?php if ( $GLOBALS['exclude'] <> $post->ID ) { ?> <div class="post wrap"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php if ( get_post_meta($post->ID,'image', true) ) { ?> <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD --> <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=<?php if ( get_option('woo_thumb_height') <> "" ) { echo get_option('woo_thumb_height'); } else { ?>100<?php } ?>&w=<?php if ( get_option('woo_thumb_width') <> "" ) { echo get_option('woo_thumb_width'); } else { ?>100<?php } ?>&zc=1&q=90" alt="<?php the_title(); ?>" class="alignleft" /></a> <?php } ?> <?php if ( get_option('woo_content_left') ) { the_content(); } else { the_excerpt(); ?><a href="<?php the_permalink() ?>" class="read-more">Full Story</a><?php } ?> </div> <?php } ?> <?php endwhile; ?> <div class="more_entries"> <div class="alignleft"><h2><?php next_posts_link('« Older Entries') ?></h2></div> <div class="alignright"><h2><?php previous_posts_link('Newer Entries »') ?></h2></div> </div> <?php endif; ?> </div> <?php if (get_option('woo_popular_posts') != "0") { ?> <div id="popular-articles" class="col-right"> <h2>Popular Articles</h2> <?php include(TEMPLATEPATH . '/includes/popular.php' ); ?> </div> <?php } ?> </div> </div> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?> Code (markup):
ok got the problem the sitemap link is included in the wp_list_pages so you can't change it in the code you need to do it in wordpress or you change the naviagtion. exclude the sitemap in the wp_list_pages function and add the code I posted above
oh.. i think i get it.. but not sure though.. i'll try it.. btw, when you visit my site, you can see two menu.. can you do anything to make it one?
actually, i gave all the cats as parent.. there is not sub cat.. should i remove any codes from the pages above?
I would try to remove this part <!-- SUB CAT STARTS --> <?php if (is_category()) { $this_category = get_category($cat); } ?> <?php if($this_category->category_parent) $this_category = wp_list_categories('orderby=id&show_count=0&title_li=&child_of='.$this_category->category_parent."&echo=0"); else $this_category = wp_list_categories('orderby=id&show_count=0&title_li=&child_of='.$this_category->cat_ID."&echo=0"); ?> <?php if ($this_category != "<li>No categories</li>") { ?> <div id="subcat-menu-out"> <div id="subcat-menu"> <?php if ($this_category) { ?> <ul class="wrap"> <?php echo $this_category; ?> </ul> <?php } ?> </div> </div> <?php } ?> <!-- SUB CAT ENDS --> Code (markup):