|
|
|
|
|
|
![]() |
#1 |
Are you sure you're an accredited and honored pornographer?
Join Date: Jul 2005
Posts: 64
|
Wordpress Help - Blogroll
Does any one know how to get the sidebar in the default theme in Wordpress to include the Links or blogroll to appear on every page instead of just the front page?
Here is the code for the side bar: <div id="sidebar"> <ul> <li> <?php include (TEMPLATEPATH . '/searchform.php'); ?> </li> <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. <li><h2>Author</h2> <p>A little something about you, the author. Nothing lengthy, just an overview.</p> </li> --> <li> <?php /* If this is a 404 page */ if (is_404()) { ?> <?php /* If this is a category archive */ } elseif (is_category()) { ?> <p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p> <?php /* If this is a yearly archive */ } elseif (is_day()) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for the day <?php the_time('l, F jS, Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for <?php the_time('F, Y'); ?>.</p> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for the year <?php the_time('Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> <p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p> <?php } ?> </li> <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> <li><h2>Archives</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <li><h2>Categories</h2> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> </li> <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> <?php get_links_list(); ?> <li><h2>Meta</h2> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li> <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> <?php wp_meta(); ?> </ul> </li> <?php } ?> </ul> </div> Thank you in advance. |
![]() |
![]() |
![]() |
#2 |
Trying is the first step towards failure
Join Date: Aug 2003
Location: Michigan
Posts: 123
|
i belive if you just add
<?php get_sidebar(); ?> above ... <?php get_footer(); ?> on the single.php....it should show up
__________________
Baxter's Network - My Network Of Porn Sites!!! |
![]() |
![]() |
![]() |
#3 |
If something's hard to do, then it's not worth doing
Join Date: Oct 2005
Posts: 249
|
on mine (WP 2.0 default) I had to change the class from widecolumn to
<div id="content" class="narrowcolumn"> at the top of single.php otherwise it put the sidebar on the bottom...and thanks for the tip Baxter, I had been wondering the same thing myself!
__________________
"TGP2 Queen" and yes, still crazy! My TGP2 articles on right hand side |
![]() |
![]() |
![]() |
#4 |
Are you sure you're an accredited and honored pornographer?
Join Date: Jul 2005
Posts: 64
|
Thanks for the responses guys. The problem is that the sidebar when it is on any page other than the frontpage, it does not display the links to other sites. It only displays the categories and etc.
I think it is because of this section of the code: <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> <?php get_links_list(); ?> Any ideas as to what I should change the <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> to - so that it will get it to display on more pages than just the frontpage?? Thanks again in advance. |
![]() |
![]() |
![]() |
#5 |
Oh no, I'm sweating like Roger Ebert
|
I think you just need to remove it
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> at least the template for my new project doesn't have that line and does have links on every page. |
![]() |
![]() |
![]() |
#6 |
Just because I don't care doesn't mean I don't understand!
Join Date: May 2005
Posts: 96
|
Watch out for the dangling bracket
<?php } ?> must also go ( I think ) |
![]() |
![]() |
![]() |
#7 |
Oh no, I'm sweating like Roger Ebert
|
nice catch...i missed that and i do believe your correct. Fuck, look at me got one WP project in process and i'm already talking like i know shit.
Last edited by walrus; 2006-04-07 at 06:21 PM.. Reason: add more shit what else |
![]() |
![]() |
![]() |
#8 |
Are you sure you're an accredited and honored pornographer?
Join Date: Jul 2005
Posts: 64
|
OK I figured it out. You need to reverse the order of this code from:
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> <?php get_links_list(); ?> to <?php get_links_list(); ?> <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> Thanks to every one for their responses. Have a great weekend. |
![]() |
![]() |
![]() |
|
|