[Resolved] Open home icon on the same window

Home Forums Support [Resolved] Open home icon on the same window

Home Forums Support Open home icon on the same window

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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
    Kumar

    #1452487
    Leo
    Staff
    Customer Support

    Hi there,

    That’s strange.

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

    Let me know 🙂

    #1452495
    Kumar

    yes, it does.

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

    #1452502
    Leo
    Staff
    Customer Support

    Can 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#L137

    Have you modified the template in any way?

    #1452526
    Kumar

    See image in the private box below.

    I have now disabled it. Please check

    Regards
    Kumar

    #1452563
    Leo
    Staff
    Customer Support

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

    In that case can you disable all plugins to first?

    #1452576
    Kumar

    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

    #1452589
    Leo
    Staff
    Customer Support

    The code is disabled currently correct?

    The logo is still opening in a new tab to me:
    https://www.screencast.com/t/21OWeUb9TXA

    Is that not what you are seeing?

    #1452602
    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.

    #1452606
    Leo
    Staff
    Customer Support

    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?

    #1453486
    Kumar

    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

    #1454059
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.