Archived topic
Header Logo - where to add link?
16 replies · Started by Jane on February 2, 2015
I am trying to find this in my site."there’s a filter that allows you to change the URL of the logo/header." Where do I find it? I have the GP Premium. thanks!
Hi Jane,
You could add a PHP snippet like the below using this plugin: https://wordpress.org/plugins/code-snippets/
add_filter('generate_logo_href','generate_custom_logo_href');
function generate_custom_logo_href()
{
return 'http://google.com';
}
Let me know if you need more info :)
Tom,
I have just started with word press and generate press. I know very little about this. I am trying to change the url for the logo on a site I am building. I have read everything I can find on your questions and answers and I am trying to use the code snippet plugin to add this code you gave to one of your inquirers, but I'm just not getting it. I cant seem to find where to insert the code to even try it.
Can you help me with this. My site is http://www.palisades.pics I want my logo url to go to http://www.okveneer.com
Thanks,
Jack
Hi Jack,
Try copying and pasting the following code:
add_filter('generate_logo_href','generate_custom_logo_href');
function generate_custom_logo_href()
{
return 'http://www.okveneer.com/';
}
into Code Snippet (https://docs.generatepress.com/article/adding-php/#code-snippets), click Save Changes and Activate then you should be good to go.
Let me know.
I'm sorry,
I guess I have just been at it to long today.
Does the plugin add the code or do I have to put it into the header php and if I do where the head, body or etc.
Sorry to be so confused..............
Thanks,
Jack
The Code Snippet plugin adds the code for you as long as it's activated.
Thanks for working with me. This is all new to me.
Am I supposed to place the short somewhere and if so, where.
Thanks,
Jack
Am I supposed to place the short somewhere
Not sure what you meant?
This post should be everything you need to do: https://generatepress.com/forums/topic/header-logo-where-to-add-link/#post-312320
I'm sorry.
I meant to say Am I supposed to Place the short code somewhere?
Thanks,
Jack
I don't know what I did but it is working now.
Thanks,
Jack
Glad it's working!
Now I have an add below the footer on palisades.pics. How can I remove that?
The ad ( PHP Code Snippets Powered By : XYZScripts.com )
Thanks,
Jack
Looks like that's being added by the plugin you chose.
I would go with this one instead: https://en-ca.wordpress.org/plugins/code-snippets/
Thanks for the good advice - just installed the plugin and added the snippet to my site: https://kviklaan.nu/kviklaan/ and it works like a charm
Awesome :)