• Hi, I’d like to solve a navigation problem by directing clicks on the blog title to a link that is not the home page.

    If think I’ve found the right piece of code in the header.php –

    <?php if ( is_home() ) { ?><?php bloginfo(‘name’); ?> | <?php bloginfo(‘description’); ?><?php } ?>

    What do I need to change to direct clicks to –

    https://myblog.com/category/news/

    Hope you can help and thanks a million!
    Kate x

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter katebutler

    (@katebutler)

    Thanks Samuel, that’s a really useful plugin. It’s not quite what I’m looking for though. I shall try to explain a bit better!

    I’m trying to figure how visitors to my site can be directed to a page/post other than the home page when clicking the blog title.

    I’m using the WPFolio theme which has the option to activate a sidebar if you use a category like ‘blog’ or ‘news’.

    When visitors navigate away from the news page, I’d like them to be able to return by clicking the blog title.

    I’m still quite new to all this so I hope I’m making sense!
    Thanks again.
    Kate x

    when clicking the blog title

    I am a bit confused. When you say “blog” title – you are speaking of posts? or your blog page with posts?

    Your looking for the line that says something like this:
    <a href="<?php bloginfo('url'); ?>" title="<?php _e('Back to Home', TEMPLATE_DOMAIN); ?>"><?php _e('Home', TEMPLATE_DOMAIN); ?></a>

    see it grab the site url dynamically? via bloginfo('url') ?
    what its doing is a normal html href link, but instead of having the addresses between the “” on href= part, they drop php inbetween the ” marks.

    what you would do for the above code to make the ‘home’ button go to my website would be this:

    <a href="https://example.com" title="<?php _e('Back to Home', TEMPLATE_DOMAIN); ?>"><?php _e('Home', TEMPLATE_DOMAIN); ?></a>

    see how I removed the dyanamic call <?php bloginfo('url'); ?> and just put in my web address?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Re-direct blog title to custom URL rather than 'home'’ is closed to new replies.