Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1233496

    Hi,

    I have searched through the forum but cannot seem to find the answer. How do I get the RSS Icon in the header and footer to open in a new window?

    Kind regards,

    Mark

    #1233832

    Hey Mark,

    Could you post a link to where we can see the element in question please?

    Best regards,
    Rikard

    #1233915

    Hi,

    My website is: https://www.simplygreatoffers.com/

    A few months back you gave me the following code to set the “Learn More” button in the cookies consent pop-up to open up in a new window (target blank). Is it possible to alter it for the RSS icons in the header and footer maybe?

    /*set learn more button on cookies pop-up to target blank*/
    add_action(‘wp_footer’, ‘ava_consent_button_target’, 9999);
    function ava_consent_button_target() {
    ?>
    <script>
    (function($) {
    $(‘.avia-cookie-consent-button’).attr(‘target’, ‘_blank’);
    })(jQuery);
    </script>
    <?php
    }

    Kind regards,

    Mark

    #1234463

    Hi Mark,

    I think that should be possible yes, please try this function in functions.php as well:

    function markransome_rss_new_tab() {
    ?>
    <script>
    (function($) {
    $('.av-social-link-rss a').attr('target', '_blank');
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'markransome_rss_new_tab', 9999);

    Best regards,
    Rikard

    #1234471

    Hi,

    Yes, thanks for that, it works a treat!

    Cheers,

    Mark

    #1234758

    Hi Mark,

    Great, I’m glad that you got it working and thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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