- This topic has 11 replies, 2 voices, and was last updated 4 months ago by
Leo.
-
AuthorPosts
-
September 21, 2020 at 5:57 am #1452123
Kumar
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
KumarSeptember 21, 2020 at 8:18 am #1452487Leo
StaffCustomer SupportHi there,
That’s strange.
Does the logo the home in a new window without that snippet?
Let me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 21, 2020 at 8:24 am #1452495Kumar
yes, it does.
It is a multisite.. so from sub-directory to primary domain. See sites details in the private box.
September 21, 2020 at 8:28 am #1452502Leo
StaffCustomer SupportCan you disable that snippet for me to take a look?
The logo image should not open in a new window by default as it doesn’t have the
target="_blank"
markup:
https://github.com/tomusborne/generatepress/blob/7fdcddf18209a84aaa75304ab23f768241e08ed4/inc/structure/header.php#L137Have you modified the template in any way?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 21, 2020 at 8:38 am #1452526Kumar
See image in the private box below.
I have now disabled it. Please check
Regards
KumarSeptember 21, 2020 at 9:17 am #1452563Leo
StaffCustomer SupportSo it’s still opening a new tab without the code?
In that case can you disable all plugins to first?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 21, 2020 at 9:22 am #1452576Kumar
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
KumarSeptember 21, 2020 at 9:32 am #1452589Leo
StaffCustomer SupportThe code is disabled currently correct?
The logo is still opening in a new tab to me:
https://www.screencast.com/t/21OWeUb9TXAIs that not what you are seeing?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 21, 2020 at 9:42 am #1452602Kumar
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.
September 21, 2020 at 9:46 am #1452606Leo
StaffCustomer SupportSo 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:
In that case, can you disable all plugins including GP Premium and any custom functions you are using?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 22, 2020 at 2:36 am #1453486Kumar
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
KumarSeptember 22, 2020 at 8:34 am #1454059Leo
StaffCustomer SupportNo problem 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.