Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1130337

    Hello,

    how can I specify in a Masonry gallery that it will open an extra browser window when linking to an external page? Until now, only the whole content changes, which is a problem.

    regards,
    Martin

    #1130363

    Hey m_reiprich,

    What do you mean the whole content changes?

    Could you please attach some screenshots of the issue?

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1132182

    The problem is very simple. In a Masonry gallery I want to show partner logos. Click on the logo to open a new browser window with the partner’s page. Until now, the new page opens in the same browser window and I do not want that.

    An example: https://www.academixer.com
    At the bottom “Unsere Unterstützer”. So it is not right, a new page should rise.

    regards,
    Martin Reiprich

    #1133226

    Hi,

    Thank you for the clarification.

    You can use this in the functions.php file to set the target attribute of the masonry links to “_blank”.

    
    function new_custom_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
         $('.av-masonry-entry').each( function() {
             $(this).attr('target', '_blank');
         });
      });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'new_custom_script');
    

    Best regards,
    Ismael

    #1134248

    Thank you! Does this have to be done with Enfold> General Syling> Quick CSS? I tried that, unfortunately it does not work. Or should I look for this function.php and write in there? If yes, in which line?

    #1134558

    Hi,

    You can add that to the end of functions.php.

    Best regards,
    Jordan Shannon

    #1176516

    Thank you. Script is OK!

    #1176569

    Hey uuniversal,

    I’m glad this helped you!

    Best regards,
    Jordan Shannon

    #1233705

    Hello,

    now I want to do the same on another site, but unfortunately it doesn’t work there: http://www.designplanung.com/projekt-068/&gt; the small logos below under “Unsere Sponsorten”

    I have inserted the code into the functions.php:

    function new_custom_script () {
    ?>
    <script>
    (function ($) {
    $ (document) .ready (function () {
    $ (‘. av-masonry-entry’). each (function () {
    $ (this) .attr (‘target’, ‘_blank’);
    });
    });
    }) (jQuery);
    </script>
    <? php
    }
    add_action (‘wp_footer’, ‘new_custom_script’);

    The current WordPress installation and Enfold 4.7.4 are installed. What am I doing wrong?

    Best regards,
    Martin

    #1234062

    Hi Martin,

    Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #1234098

    Thank you, I do this.

    • This reply was modified 4 years, 4 months ago by Martin.
    #1234142

    on the second page you have allready activated the merging of css and javascript files: So i think it is only a caching reason for that.
    Go to dashboard – enfold – performance : and on the bottom of that page there is: “Delete old CSS and JS files?”
    mark that – and save all changes.

    ______

    Dashboard – Enfold – Leistung : “Alte CSS- und JS-Dateien löschen?”
    Das Feld markieren und alle Änderungen speichern.

    #1234144

    Yes Guenni, it works, thanks a lot!!!

    #1234217

    Hey m_reiprich,

    I’m glad this was resolved for you! If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Masonry Gallery should open new browser window’ is closed to new replies.