Change link in the header

Community Forums Forums General Discussion Change link in the header

This topic is: resolved

Tagged: 

This topic contains 15 replies, has 2 voices, and was last updated by  nutsandbolts 11 months, 2 weeks ago.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #78559

    eriksatie
    Member
    Post count: 7

    Hi to everyone,
    I need help on changing the link in the header, that is now to /blog, because the blog is installed in this folder
    I want to change to /
    simply as that

    I’ve read around that i need to modify the file header.php but I cannot find it!
    I have an Epik theme

    thx in advance

    #78567

    nutsandbolts
    Keymaster
    Post count: 3187

    Your header will link to whatever is set as the home URL in Settings > General.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78577

    eriksatie
    Member
    Post count: 7

    oh oh
    I’ have screwed up everyting!
    I’ve changed the URL site from /blog to / and now the backoffice is not loading anymore!

    please HELP! where I can change back this now?

    #78578

    nutsandbolts
    Keymaster
    Post count: 3187

    Okay, don’t panic.

    Ask your host’s tech support to change your home URL back to yourdomain.com/blog/ and they’ll fix it in your database. If you don’t want to use /blog/, you’ll need to set up a redirect or move your WP install to the root directory.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78590

    eriksatie
    Member
    Post count: 7

    ok I really would prefer to solve it by myself if possible… I have access to FTP and mysql, but not much experience with database.

    can you give me some step-by-step help or point me towards an article where is clearly written what to do and how?

    just to give some more info. on the root there is another site, that is working, so move the blog on the root is not an option. I just want to make it working again at /blog

    #78591

    nutsandbolts
    Keymaster
    Post count: 3187

    Sure, no problem.

    In phpMyAdmin, click on the database for the blog, then click on the wpoptions table. On the first page, you’ll see the URL about 5-6 items down. You can double click to edit the URL and change it back. Then scroll down and use the arrow to go to page two, where you’ll see it again. Once you change those, the site should be unbroken. :)


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78599

    eriksatie
    Member
    Post count: 7

    mmm having access to wp-config.php I thought I would be able to access phpMyAdmin but I can’t find the panel.
    from wp-config.php I can see that the DB is on another host but I cannot gues the right URL.
    is there any way to find it?

    #78600

    nutsandbolts
    Keymaster
    Post count: 3187

    If your host uses CPanel, you should be able to access phpMyAdmin from there.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78602

    eriksatie
    Member
    Post count: 7

    unfortunely I cannot access Cpanel, just the FTP.

    #78603

    nutsandbolts
    Keymaster
    Post count: 3187

    Without access to phpMyAdmin, unfortunately there’s no good way to edit the database.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78756

    eriksatie
    Member
    Post count: 7

    yup! solved, now it is working again. thank you very much! : )

    now back to the original question: how to change the link in the logo?
    the blog in installed in /blog and also the URL is /blog
    in the root there is the “official” site. I want that clicking the logo the user always goes to /

    #78811

    nutsandbolts
    Keymaster
    Post count: 3187

    Try this function – I haven’t tested it, but it’s from Bill Erickson so I’m sure it will work (be sure to replace example.com with your domain):

    //* Change logo URL
    function be_logo_url( $title, $inside, $wrap ) {
    	$inside = sprintf( '<a href="%s" title="%s">%s</a>', esc_url( 'http://www.example.com' ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
    	$title = sprintf( '<%s id="title">%s</%s>', $wrap, $inside, $wrap );
    	return $title;
    }
    add_filter( 'genesis_seo_title', 'be_logo_url', 10, 3 );

    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78819

    eriksatie
    Member
    Post count: 7

    the functions has changed the link, not the one in the logo image but the one in the title (that should be disabled, but with this functions is has reappeared).

    #78820

    nutsandbolts
    Keymaster
    Post count: 3187

    Are you using the HTML5 version of Epik? If so, try this one instead:

    //* Change logo link
    add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
    function child_header_title( $title, $inside, $wrap ) {
        $inside = sprintf( '<a href="http://example.com/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
        return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $wrap, $inside );
    }

    If that one doesn’t work, let me know and I’ll keep looking for a solution.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #78832

    eriksatie
    Member
    Post count: 7

    yesss!

    really very kind Andrea, thank you very much!

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.