Hi,
an option could be to change the default behave of the site title by modifying this from within your child theme.
This URL is generally hardcoded in header.php. For example, Twenty Sixteen use this:
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif;
Of course, this can vary from one theme to another. But that’s the idea.
From this, you can play with the conditionnals or add activity to the URL.
Thanks for the reply, I think I have a similar code in my theme’s header file but as I’m new to coding & don’t know what to change so could you please provide the correct code/function where site-title is activity page regardless of the front page which I can add to the header.php under a child theme. Thanks.
Here’s my site:
http://www.thingsfail.com
In wp settings, define a static page as homepage (wich will be your welcome page), and don’t use BP “activity” page. Dashboard > Settings > Read
Add all BP items (activity, members, groups, …) to a menu ( haven’t seen them).
And for your site title link, use something like this:
instead of home_url( '/' )
, replace by home_url( '/activity' )
for both if/else
Thanks for a quick turn-around. I implemented your solution by creating a new header.php in my child theme containing only the above code & now my site is blank. Do I need to copy the entire code of parent theme’s header.php file to the child’s header.php or do I need to add it as a function as far as I’m aware with functions.php we use filters/actions(no idea how it works though).
Please guide me on where exactly the code will go. Below header.php code for site-title:
<?php if ( is_front_page() || is_home() ) : ?>
<h1 id="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</h1>
<?php else : ?>
<h3 id="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</h3>
<?php endif; ?>