• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

make inner pages header click to different url

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › make inner pages header click to different url

This topic is: resolved

Tagged: genesis, header, landing, magazine

  • This topic has 2 replies, 1 voice, and was last updated 9 years, 11 months ago by KarenLeighBurton.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 21, 2013 at 9:44 pm #22129
    KarenLeighBurton
    Member

    Hi all, hoping someone can help.

    I have a site where on the home page (route of the site) the header of course links to that page, BUT on all interior pages and posts I want the psudo homepage to be a different page if someone clicks on the header rather than taking them back to the main url (as that is a landing type sales page). I am using the genesis theme and just having absolutely no luck.

    basically

    if you go to http://www.mybirthbusinessrocks.com the header can click to this url as it is the sales page and I don't want anyone having access to the interior until they have purchased the program

    once someone purchases the program I don't want them to ever see the main homepage again (unless they specifically type it in), so lets say they are on url http://www.mybirthbusinessrocks.com/class1 and click on the header (by accident) I want it to take them to http://www.mybirthbusinessrocks.com/welcome since there is no way back to the interior of the site from the sales/landing page.

    is there a way to do this? if so can someone help me (I am completely php newbie and don't understand hooks very well, but I can copy and paste like a master 🙂

    appreciate the help

    February 21, 2013 at 10:44 pm #22139
    KarenLeighBurton
    Member

    So, I've found this little piece of code... which works great to just change the url, but i still need the home page header to simply either not link to anything or only link to the sales page (home page)

    function child_header_title( $title, $inside, $wrap ) {
    $inside = sprintf( '<a href="http://mybirthbusinessrocks.com/student-login/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
    return sprintf( '<%1$s id="title">%2$s</%1$s>', $wrap, $inside );
    }

    I tried using a conditional is_front_page() with it, but all it does is give me errors and I have to go in through cpanel and reupload the functions.php.  Can someone tell me what i am doing wrong?

    February 21, 2013 at 11:20 pm #22147
    KarenLeighBurton
    Member

    Woo Hoo! I finally, after about 30 different restores of the functions.php found the correct way to do this.... so if anyone needs it here it is!!!!!

    add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
    /**
    * Change default Header URL.
    */

    function child_header_title( $title, $inside, $wrap ) {
    if ( is_front_page() ) {
    $inside = sprintf( '<a href="http://www.yourdomain.com/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
    } else {
    $inside = sprintf( '<a href="http://www.yourdomain.com/innerpage/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
    }
    return sprintf( '<%1$s id="title">%2$s</%1$s>', $wrap, $inside );
    }

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘make inner pages header click to different url’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble