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

    Hello! You guys helped me create this function which has the masonry opening on in a new tab on the homepage. I’m looking to add this same function to a few other pages listed in private area. I see you are using .home here but wasn’t sure what to use for the other pages. Can you help with this? THANK YOU!

    
    
    function av_add_attribute() {
    ?>
    	<script type="text/javascript">
    		(function($) {
    			$(window).load(function() {
    				$('.home .av-masonry-entry.isotope-item').attr('target', '_blank');
    			});
    		})(jQuery);
    	</script>
    <?php
    }
    add_action('wp_footer', 'av_add_attribute');
    #1186382

    Hey bobfurgo,

    You should be able to copy this line below itself:

    $('.home .av-masonry-entry.isotope-item').attr('target', '_blank');

    Then replace .home with the page ID class. You can find that class in the body tag of each page or in the URL when you edit the page in question.

    Best regards,
    Rikard

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