Jump to content
Sign in to follow this  
marklamberth

Change header image link target

Recommended Posts

marklamberth

Hi, I'd like to change the link target for the header image to something else besides the home page. Normally, I'd look in header.php, but no luck there. Where can I find this code? I have the platformbase child theme installed.

Share this post


Link to post
Share on other sites
catrina

You can find the code in one of the PHP files but rather than changing it there, try adding this to the bottom of the functions.php file: ` add_filter('pagelines_main_logo','my_header'); function my_header($header){ $header = sprintf( '%s', home_url(), get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); ` Change your link where the code says

ADDYOURLINKHERE

.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
marklamberth

It does not work for me. First, that code was missing the closing bracket }, but I figured that out. I tried a couple urls... (was the &quot intended? I tried both "http://www.google.com"'>http://www.google.com" and "http://www.google.com"; ) It didn't do anything to the banner, no change. By the way I was in /platformbase/functions.php Any other ideas? What is the actual file? Thanks!

Share this post


Link to post
Share on other sites
timlinson

Yes it goes in platformbase/functions.php (and make sure that platformbase is your active theme). This should work: ` add_filter('pagelines_site_logo', 'my_header'); function my_header($header) { $header = sprintf('%s', 'http://your_url.com/', get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); return $header; } `

Share this post


Link to post
Share on other sites
marklamberth

Hi Tim, Ok, great, thanks for the new code, it works. However, now my client is wanting to possibly make a lightbox pop-up with a form in it, activated by a click on the header, or other code. What is the equivalent in platform pro to the header.php in a regular wordpress theme? I want to be able to get in there and edit the actual code, not add a hack to functions.php Thanks in advance..

Share this post


Link to post
Share on other sites
catrina

The equivalent in PlatformPro to the header.php is template.branding.php. However, It's highly recommended that hooks are used (rather than editing the parent files) because changes don't carry over when the theme is upgraded. There's a risk of losing the work done in the parent files when a theme update is made. It would be possible to use a hook to implement the Lightbox.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
marklamberth
I am a little frustrated with this whole system you guys have. I was told to install the platformbase child theme so that I can edit theme files without them being over-ridden. And now, you say I cannot edit the header ( template.branding.php ) without it being overwritten. What if I move it to the /platformbase/ theme folder? Will it still be overwritten then?

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  

×