1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help - adding link to a page?

Discussion in 'Content Management' started by surya, Dec 26, 2008.

  1. #1
    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?
     
    surya, Dec 26, 2008 IP
  2. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #2
    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?
     
    Sensei.Design, Dec 26, 2008 IP
  3. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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?
     
    surya, Dec 26, 2008 IP
  4. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #4
    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
     
    Sensei.Design, Dec 26, 2008 IP
  5. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    we cant give hyperlinks to a page title..
    i guess?
     
    surya, Dec 26, 2008 IP
  6. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #6
    did you try it? I don'T know why it should be not allowed
     
    Sensei.Design, Dec 27, 2008 IP
  7. hardcore-

    hardcore- Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Or you could just edit the template..
     
    hardcore-, Dec 27, 2008 IP
  8. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    @ 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
     
    surya, Dec 27, 2008 IP
  9. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #9
    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
     
    Sensei.Design, Dec 27, 2008 IP
  10. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #10
    thanks for the help.. but, i cant find that code..
    is there any other way?
     
    surya, Dec 27, 2008 IP
  11. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #11
    I suppose there is not but can you post your index.php and the head.php it should be in one of them
     
    Sensei.Design, Dec 27, 2008 IP
  12. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #12
    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'); ?>&nbsp;|&nbsp;<?php bloginfo('description'); ?><?php } ?>
    <?php if ( is_search() ) { ?><?php bloginfo('name'); ?>&nbsp;|&nbsp;Search Results<?php } ?>
    <?php if ( is_author() ) { ?><?php bloginfo('name'); ?>&nbsp;|&nbsp;Author Archives<?php } ?>
    <?php if ( is_single() ) { ?><?php wp_title(''); ?>&nbsp;|&nbsp;<?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_page() ) { ?><?php bloginfo('name'); ?>&nbsp;|&nbsp;<?php wp_title(''); ?><?php } ?>
    <?php if ( is_category() ) { ?><?php bloginfo('name'); ?>&nbsp;|&nbsp;Archive&nbsp;|&nbsp;<?php single_cat_title(); ?><?php } ?>
    <?php if ( is_month() ) { ?><?php bloginfo('name'); ?>&nbsp;|&nbsp;Archive&nbsp;|&nbsp;<?php the_time('F'); ?><?php } ?>
    <?php if (function_exists('is_tag')) { if ( is_tag() ) { ?><?php bloginfo('name'); ?>&nbsp;|&nbsp;Tag Archive&nbsp;|&nbsp;<?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); ?>&amp;h=<?php if ( get_option('woo_image_height') <> "" ) { echo get_option('woo_image_height'); } else { ?>170<?php } ?>&amp;w=<?php if ( get_option('woo_image_width') <> "" ) { echo get_option('woo_image_width'); } else { ?>350<?php } ?>&amp;zc=1&amp;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); ?>&amp;h=<?php if ( get_option('woo_thumb_height') <> "" ) { echo get_option('woo_thumb_height'); } else { ?>100<?php } ?>&amp;w=<?php if ( get_option('woo_thumb_width') <> "" ) { echo get_option('woo_thumb_width'); } else { ?>100<?php } ?>&amp;zc=1&amp;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('&laquo; Older Entries') ?></h2></div>
                            <div class="alignright"><h2><?php previous_posts_link('Newer Entries &raquo;') ?></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):
     
    surya, Dec 27, 2008 IP
  13. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #13
    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
     
    Sensei.Design, Dec 27, 2008 IP
    surya likes this.
  14. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #14
    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?
     
    surya, Dec 27, 2008 IP
  15. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #15
    just delete the subcats and it will be just one line for the menu if you need subcats use dropdowns
     
    Sensei.Design, Dec 27, 2008 IP
  16. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #16
    actually, i gave all the cats as parent.. there is not sub cat..
    should i remove any codes from the pages above?
     
    surya, Dec 27, 2008 IP
  17. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #17
    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):
     
    Sensei.Design, Dec 27, 2008 IP
  18. surya

    surya Peon

    Messages:
    720
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #18
    A Thousand thanks...:)
    awesome.. thank you thank you thank you:)
     
    surya, Dec 27, 2008 IP
  19. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #19
    your welcome ;)
     
    Sensei.Design, Dec 27, 2008 IP