Hello i am looking for wordpress plugin or some code that i can put in wordpress theme so that link exchange partners's link only appear on main page of wordpress. As we know Blogroll put links on all pages, that why i am looking to find something by which links could only be displayed on main page only. Anyone could help me in this regard. This is my index.php file of wordpress theme : <?php get_header(); ?> <div id="contentwrapper"><div id="content"> <div class="adsense_top"><?php include (TEMPLATEPATH . '/adsense_top.php'); ?></div> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2 class="postTitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <div class="postMeta"> <span class="date"><?php the_time('M.d, Y') ?></span> in <span class="filed"><?php the_category(', '); ?></span> </div> <div class="postContent"><?php the_content('[Read the rest of this entry...]'); ?></div> <p class="comments"><?php comments_popup_link('Leave a Comment', 'Comments (1)', 'Comments (%)'); ?></p> </div> <!-- Closes Post --> <?php endwhile; ?> <?php else : ?> <div class="post"> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> </div> <!-- Closes Post --> <?php endif; ?> <div id="nextprevious"> <div class="left"><?php posts_nav_link('','','« previous entries') ?> </div> <div class="right"><?php posts_nav_link('','next entries »','') ?></div> </div> </div></div> <!-- Closes Content --> <?php get_sidebar(); ?> <div class="cleared"></div> </div> <!-- Closes Main --> <?php get_footer(); ?> HTML:
If all you are wanting is to display a list of links in a sidebar widget only on the home page get the PHP Code widget then add the following code into the widget to display the content only on the home page of the blog: <?php if (is_home()) { ?> <a href="http://br1.com">BlogRoll Link 1</a> <a href="http://br2.com">BlogRoll Link 2</a> <a href="http://br3.com">BlogRoll Link 3</a> <?php } ?> Code (markup): When you are on the home page the content will show, on other pages the links will be gone. If you find a blogroll widget that allows function calls as opposed standard widget placement you could use the function call as opposed to the HTML