sorry – i set the question status wrong
Sorry to be posting again – I really need help with this issue. Is there anyone that can oblige?
I’m sure it’s just something small that i’ve overlooked, if you can help i’d appreciate that greatly
Try this:
<li<?php if ( is_page( \'about\' ) ) : ?> class=\"selected\"<?php endif; ?>><a href=\"<?php echo $bp->root_domain; ?>/about/\" title=\"<?php _e( \'About\', \'buddypress\' );?>\"><?php _e( \'About\', \'buddypress\' );?></a></li>
Hi Andy,
I get this:
Parse error: syntax error, unexpected ‘‘ in /home/fhlinux140/g/gigbuddy.org/user/htdocs/wp-content/themes/gigbuddy-home/header.php on line 41
Any other ideas?
Phil
i hope this could help: try change THIS
<li<?php if ( is_page( ‘about’ ) : ?> class=”selected”<?php endif; ?>
into THIS
<li<?php if ( is_page( ‘about’ ) ) {?> class=”selected”<?php } ?>
Hi Sgrunt,
This works except the home tab stays selected have a look, http://gigbuddy.org/about/
I’d expect that’s wh andy put in the endif.
I need the home tab de-selected.
Phil
yes, in the example there is written if ( is_page( ‘about’ ) and so when you are watching the about page it selects HOME also. I presume you can change it in:
if ( is_page( ” )
but i’m not sure
I’m totally flummoxed by this one! Y’see I don’t know enough php and how to use the syntax correctly to be able to fix this – Andy, if you’re there … please help
last try
instead of if ( is_page( ‘about’ )
try if ( is_page( ‘home’ )
nope, that just takes it off the ‘about’ tab completely
The latest trunk will stop the home page from highlighting, it’s actually a BP bug.
Also – I missed a ) off my example which was causing the error.
Hi Andy, Thanks for that (damned brackets lol). I’ve been using a zip version of buddypress from about 2-3 weeks back. Everything ‘so far’ (touch wood) has worked and thought there was no need to update from the trunk. This was the first time EVERYTHING in a bp install worked for me. My problem is, that if I do update from the trunk then everything will go ‘boobies to the dasies’ if you know what I mean, as there have been significant changes e.g. where you’ve placed the member themes etc.
If there is a hack I can implement to tide me over I would be extremely grateful. I’m almost finished the site y’see and will be demoing it tomorrow.
Thanks for your time as always.
Phil
I understand your reluctance to install a new version of bp on the day before a site demo. I see the issue you are talking about. Your ‘home’ tab highlight doesn’t turn off when you choose ‘about’. It does with the other tabs you have such as ‘blogs’ are selected. Whatever code you are using for those tabs in your theme should be used for ‘about’.
Since this is a custom theme you’re running it’s tough to help out.
@ Burt,
Thanks for your reply. The only thing that’s changed is that i’ve added the ‘about’ tab (and renamed some of the other existing tabs). I see that Andy has managed to do exactly what I need to do with the new BP site but I also assume that this relies on the new trunk. Would someone be able to add the ‘nav’ portion of the php code from header.php in the new trunk here so i can try to hack it? Alternatively is there a browser based php interrogator (like firebug) so that I may see what has been done to this site?
@ Everyone,
Cheers for all your help so far guys – I’d still be stuck with the ‘about’ tab not highlighting otherwise, I am truly grateful for your help
http://pastie.org/427663
You don’t have to install the latest trunk to get it and take a look at it Phil.
From the linux cmd line:
svn co https://svn.buddypress.org/trunk
From windows using http://tortisesvn.net
https://svn.buddypress.org/trunk
I dunno Mac.
You can just create a directory somplace and check out the files to that dir. Then you have a copy of the latest bp to play with.
Righteo, I spoke to a mate about this earlier and he said it was a function. I went raking to see if the function in the trunk was different from my current install – lo and behold, it was, so I\’ve just tested the replacement function and everything is hunky-dory
For anyone in the same prediciment as me it\’s here – replace the old function with this:
bp-core/bp-core-templatetags.php on line 392
function bp_is_page($page) {
global $bp;
if ( $bp->displayed_user->id || $bp->is_single_item )
return false;
if ( $page == $bp->current_component || ( is_home() && $page == \'home\' && $bp->current_component == $bp->default_component ) || ( $page == MEMBERS_SLUG && !$bp->current_component ) )
return true;
return false;
}
I am SOOOOOOOOO chuffed that’s out of the way