Jump to content
Sign in to follow this  
emmymcleish

Change Header Link

Recommended Posts

emmymcleish

I need the main header to link to another page instead of the default home page. Read another post but it did not work, which part of the below an I replacing with the new URl? Thanks, function pagelines_main_logo(){ if(pagelines_option('pagelines_custom_logo')){ $site_logo = sprintf( '%s', home_url(), get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); echo apply_filters('pagelines_site_logo', $site_logo); } else { $site_title = sprintf( '<div class="title-container">%s<h6 class="site-description subhead">%s</h6></div>', esc_url(home_url()), __('Home','pagelines'), get_bloginfo('name'), get_bloginfo('description'));

Share this post


Link to post
Share on other sites
emmymcleish

I did not see that post so I will try that next. Thanks!

Share this post


Link to post
Share on other sites
emmymcleish

Themes-platformbase-funtion.php-copy that code from the last posting of the above link-change the URL to mine and still nothing. Based on what I have done above, any ideas where I could be going wrong? Thanks

Share this post


Link to post
Share on other sites
timlinson

PlatformBase is your active theme in Appearance > Themes? and can you post your site link?

Share this post


Link to post
Share on other sites
emmymcleish

In the FTP I need to find appearance apparently, i will go look for it. web address under construction so code to see anything is 8522, thanks

Share this post


Link to post
Share on other sites
timlinson
In the FTP I need to find appearance apparently
Not sure what you mean here. You can just go into wordpress admin dashboard -> Appearance -> Themes, and make sure your active theme is PlatformBase, not PlatformPro.

Share this post


Link to post
Share on other sites
emmymcleish

OK, I was in the host FTP. Changed the theme to PlatformBase>Appearance-editor>theme functions>pasted code at bottom without success,see code below add_filter('pagelines_site_logo', 'my_header'); function my_header($header) { $header = sprintf('%s', 'http://northwestvalleyfanclub.com/local-businesses/promontional-gift-give-away/', get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); return $header; } Thanks,

Share this post


Link to post
Share on other sites
timlinson

That code looks wrong, but I think it's just because of the forum formatting. It sounds like you copy/pasted my code and only changed the url, which is the right way, so I'm not sure why it's not working. I just tested this again and it still works on my end: ` add_filter('pagelines_site_logo', 'my_header'); function my_header($header) { $header = sprintf('%s', 'http://northwestvalleyfanclub.com/local-businesses/promontional-gift-give-away/', get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); return $header; ` `}`


If this still doesn't work for you, you can just change the theme file directly like your original question. You would replace both of the `home_url()` in the theme code with `'http://northwestvalleyfanclub.com/local-businesses/promontional-gift-give-away/'` (including the quotes) Make sure to backup the file beforehand.

Share this post


Link to post
Share on other sites
emmymcleish

OK, success! Thank you for your time and patience. This time when I added the code to the Appearance-theme changed the documentation to filter. Don't know if that helped or if it was an entry error on my part.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×