make inner pages header click to different url

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

This topic is: resolved

This topic contains 2 replies, has 1 voice, and was last updated by  KarenLeighBurton 1 year, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22129

    KarenLeighBurton
    Participant
    Post count: 19

    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

    #22139

    KarenLeighBurton
    Participant
    Post count: 19

    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?

    #22147

    KarenLeighBurton
    Participant
    Post count: 19

    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 );
    }

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

You must be logged in to reply to this topic.