BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Site Title link conditions
Tagged: boss, link, site title
- This topic has 10 replies, 2 contibutors, and was last updated 9 years, 9 months ago by Alyssa.
Question
February 13, 2015 at 7:37 pm #35921@
AnonymousHi,
How could I make the site title link just above the buddypanel link to a different page for logged in members? I currently do not have a logo uploaded so I am dealing with a site title. I’d like the visitor link to be as it is, just the front page site url, but for members I would like for it to be a specific page, just to clarify.
By the way, loving the new theme. A minimal feel (that’s my style), yet bold and creative as well.
Ryan
Answers
February 14, 2015 at 3:21 pm #35966@alyssa-buddyboss
AlyssaParticipant@ryanmaler copy header.php from the parent theme and paste into the child theme.
Then edit line 313 from this:
<?php echo esc_url( home_url( '/' ) ); ?>
to this:
<?php if(!is_user_logged_in()){echo esc_url( home_url( '/' ) );}else{echo '[insert new URL here]';} ?>
February 14, 2015 at 7:39 pm #35993@
Anonymous@tjchester,
Here is what I have in header.php of the child theme:
” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>”>
Here is the error I am getting:
Parse error: syntax error, unexpected ‘{‘ in /home4/ryan/public_html/mysite.com/wp-content/themes/boss-child/header.php on line 321
February 14, 2015 at 7:43 pm #35994@
Anonymous<a href="<?php if(!is_user_logged_in(){echo esc_url( home_url( '/' ) );}else{echo '/action-news/';} ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
February 15, 2015 at 10:12 am #36004@alyssa-buddyboss
AlyssaParticipant@ryanmaler I don’t see any errors in this code. Did you edit line 321 or 313? Perhaps you accidentally made another edit on another line? Try recopying the file and try again.
February 15, 2015 at 3:33 pm #36014@
Anonymous@tjchester,
When I copy in a new header.php from boss to boss_child line 313 is
</h1>
. This is making things a little tricky since we have different line numbers. So, could give me the location a little more broadly. Is it under <!– Look for uploaded logo –> or <!– If no logo, display site title and description –>. I would think the second, because I do not have a logo just text, so that’s why I tried editing line 321. What’s your suggestion?February 15, 2015 at 9:16 pm #36026@alyssa-buddyboss
AlyssaParticipant@ryanmaler it is under the second, after recopying and pasting the code again did it work?
February 15, 2015 at 9:41 pm #36029@
Anonymous@tjchester,
I’m sorry giving you a hard time over a small tweak. I’m still getting this error, “Parse error: syntax error, unexpected ‘{‘ in /home4/ryan/public_html/mysite.com/wp-content/themes/boss-child/header.php on line 321”.
Here is that small portion of the code edited to your suggestion.<!-- If no logo, display site title and description --> <?php else: ?> <div class="site-name"> <h1 class="site-title"> <a href="<?php if(!is_user_logged_in(){echo esc_url( home_url( '/' ) );}else{echo 'http://mysite.com/action-news/';} ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"> <?php bloginfo( 'name' ); ?> </a> </h1> <p class="site-description"><?php bloginfo( 'description' ); ?></p> </div> <?php endif; ?>
February 16, 2015 at 9:10 am #36050@alyssa-buddyboss
AlyssaParticipant@ryanmaler I fixed the code in this post: https://www.buddyboss.com/support-forums/topic/site-title-link-conditions/#post-35966
Now it should work.February 16, 2015 at 11:10 am #36059@
Anonymous@tjchester,
Success! Thank you sir.
February 16, 2015 at 11:39 am #36061@alyssa-buddyboss
AlyssaParticipantNP
- The question ‘Site Title link conditions’ is closed to new replies.