PDA

View Full Version : Wordpress help - blogroll


Jel
2006-04-09, 04:12 AM
OK I have the opposite problem of http://www.greenguysboard.com/board/showthread.php?t=30506


This is what is in my sidebar:

<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<?php } ?>

Yet the links show on every page, not only the home page. It's the same code I have on my other WP blog, and that one works fine. I'm scratching my head bald trying to figure this one out, any ideas?

Dev~>
2006-04-09, 09:57 AM
hi jel

first,make sure that is really your current sidebar
if this, try removing

" || is_page() "

code:

<?php /* If this is the frontpage */ if ( is_home()) { ?>
<?php get_links_list(); ?>
<?php } ?>

just a suggestion, I did not prove

Jel
2006-04-09, 01:25 PM
Hi Dev,
Just tried that and it's still showing my 'links' on every page instead of the index page only, thanks for the idea though. Anyone think it's possible it's a htacess issue? That's an area I truly suck in, thoughts/ideas appreciated :)

Baxter
2006-04-09, 10:06 PM
check to see if you have a single.php file if you do take out the

<?php get_sidebar(); ?>

Jel
2006-04-10, 01:21 AM
I have, but that will remove the categories and recent posts which I need to keep on all pages.

Baxter
2006-04-10, 01:43 AM
then i guess im not clear on what you want on the pages?

Dev~>
2006-04-10, 03:05 AM
again, really make sure that is your current sidebar, because i have the same code and the links are only showing on index.

to make sure, just write something and upload to see if it is:

code:

this is my current sidebar!!
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<?php } ?>

-----------------------------------

ok now i litlle hack, if your blog is in your document root like www.myurl.com try:

<?php /* If this is the frontpage */
if ( $_SERVER['REQUEST_URI'] == '/') { ?>
<?php get_links_list(); ?>
<?php } ?>


else like www.myurl.com/heremyblog/

<?php /* If this is the frontpage */
if ( $_SERVER['REQUEST_URI'] == '/heremyblog/') { ?>
<?php get_links_list(); ?>
<?php } ?>

just another suggestion, I did not prove

i hope help |badidea|

Jel
2006-04-10, 05:55 AM
Yep, definitely the correct sidebar - the hack works perfectly - thankyou |shake|

Dev~>
2006-04-10, 08:37 AM
you are welcome |thumb

Jel
2006-04-10, 11:04 AM
Hi baxter,

Sorry I missed your post somehow, was not my intention to ignore you :) I wanted the blogroll links on the index page only, along with the recent posts and categories etc. and on all other pages I wanted the recent posts and categories, without the blogroll links.