[Resolved] Home Link – best practice for combining business page with blog

Home Forums Support Home Link – best practice for combining business page with blog

This topic contains 3 replies, has 3 voices, and was last updated by  Leo 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #728409

    Rolf

    Hi, I recently launched / migrated 2 separte WordPress sites into one.
    Before relaunch: one wp install for the business page, one for the blog
    Now: one for both.

    Question: When someone clicks the company logo when on a single post, the user lands on the sites homepage, not the blog page. On the business frontpage the blog is featured very far down, not a good experience when a user just wants to check out the blog.

    Is there a way – or a recommendation to have a “blog” home link, which is only shown when on the single blog post page. Or a way to show a sub-navigation / sub-logo which is only present on the /blog pages/posts?

    Thanks for tips!

    GeneratePress 2.1.4
    #728569

    Tom Lead Developer

    Hi there,

    So you’d like to change the logo link to the blog home page when on single posts?

    Let me know 🙂

    #728751

    Rolf

    Yes could be one solution.

    #728758

    Leo Customer Support

    Try this PHP snippet:

    add_filter( 'generate_logo_href','lh_single_logo_href' );
    function lh_single_logo_href()
    {
        if ( is_single() ) {
            return 'http://LOGO-URL-ON-SINGLE-POSTS';
        }
    
        return 'http://LOGO-URL-ON-OTHER-PAGES';
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Make sure to add the actual URL you want.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.