-
AuthorPosts
-
August 23, 2019 at 1:02 pm #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,
MartinAugust 23, 2019 at 1:42 pm #1130363Hey 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,
VictoriaAugust 30, 2019 at 8:47 am #1132182The 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 ReiprichSeptember 3, 2019 at 6:45 am #1133226Hi,
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,
IsmaelSeptember 5, 2019 at 9:15 am #1134248Thank 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?
September 5, 2019 at 6:01 pm #1134558Hi,
You can add that to the end of functions.php.
Best regards,
Jordan ShannonJanuary 21, 2020 at 12:06 am #1176516Thank you. Script is OK!
January 21, 2020 at 6:32 am #1176569Hey uuniversal,
I’m glad this helped you!
Best regards,
Jordan ShannonJuly 28, 2020 at 9:35 am #1233705Hello,
now I want to do the same on another site, but unfortunately it doesn’t work there: http://www.designplanung.com/projekt-068/> 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,
MartinJuly 30, 2020 at 5:29 am #1234062Hi 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,
RikardJuly 30, 2020 at 8:24 am #1234098Thank you, I do this.
- This reply was modified 4 years, 4 months ago by Martin.
July 30, 2020 at 12:19 pm #1234142on 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.July 30, 2020 at 12:27 pm #1234144Yes Guenni, it works, thanks a lot!!!
July 30, 2020 at 9:04 pm #1234217Hey 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 -
AuthorPosts
- The topic ‘Masonry Gallery should open new browser window’ is closed to new replies.