Site logo

Archived topic

Open home icon on the same window

11 replies · Started by Kumar on September 21, 2020

Viewing posts 1–12 of 12

Hi

I am using the following code from this topic- https://docs.generatepress.com/article/generate_logo_href/

Using code snippet:
add_filter( 'generate_logo_href', function() {
return "https://www.xyz.com";
} );

But it opens in a new window, can we set it to open in the same window.

Thanks
Kumar

Hi there,

That's strange.

Does the logo the home in a new window without that snippet?

Let me know :)

yes, it does.

It is a multisite.. so from sub-directory to primary domain. See sites details in the private box.

See image in the private box below.

I have now disabled it. Please check

Regards
Kumar

So it's still opening a new tab without the code?

In that case can you disable all plugins to first?

Hi Leo,

When the code is disabled, the shop home opens in the same window but as soon as I enable the code to the primary domain (probably considers it as an external domain) so opens in a new window/tab.

is there a way in the filter (generate_logo_href’, function())we could say it to open in the same tab for this url?

Regards
Kumar

my apologies, I had enabled the code..

No disabled, pls check now.

I would like it to open in the same tab when code disabled.

So the code is disabled now?

This is what I'm still seeing with my browser cache cleared - still opening in a new window which is not the default behaviour:
https://www.screencast.com/t/21OWeUb9TXA

In that case, can you disable all plugins including GP Premium and any custom functions you are using?

Hi Leo,

Thanks a lot for all your help.

I had a plugin - WP External links which were forcing all external links to open in a new window.

Thanks
Kumar

No problem :)

This archived topic is closed to new replies.