Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1105576

    Hello, I am using the catalogue element (I think I am using a modified version of it because it is called car gallery in the content elements menu)

    I have selected the option for adding a link and then when I select open link in same window it still opens in a new window

    #1106366

    Hey B,
    Sorry for the late reply, this sounds like a custom element because we don’t have a “car gallery”
    But assuming that they are created the same on all pages, Try adding this code to the end of your functions.php file in Appearance > Editor:

    function target_custom_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $('.av-car-catalogue-wrap a.btn.btn-white-border[target="_blank"]').removeAttr('target');
      });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'target_custom_script');
    

    Then check all of your pages for conflicts, it would be better if you could add a custom class to these so there would be no chance of conflicts.

    Best regards,
    Mike

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