Archived topic
generate_logo_href from different sites.
5 replies · Started by Felix on February 13, 2019
Hi there,
On the Homepage i want the logo to link to a specific site.
That worked great with:
function generate_add_custom_logo_href()
{
if (is_page( '...' ))
return '...';
But when im on another page i want the logo to lead simple back to homepage.
can you help me?
Hi there,
Try this:
add_filter( 'generate_logo_href', function( $url ) {
if ( is_front_page() ) {
return 'URL ON HOME PAGE';
}
return $url;
} );
can you pls check again? your code with ");" at the end seems to be wrong.
Looks good to me - are you getting an error?
Hello,
I have a similar request.
Is it possible to have the logo URL different based on tags or categories?
Something like:
if (tag) {
return "custom-url"
} else {
return "home-page"
}
Thank you very much!
Can you open a new topic for your question?
Thanks :)