Support » Fixing WordPress » Masonry in WP for Safari

  • Hello all,

    I have Masonry working for a custom loop. It seems to work everywhere excerpt for Safari.

    This is the exact script I’m using:

    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.masonry.min.js"></script>
    <script type="text/javascript">
      $('#linky').masonry({ singleMode: true });

    Any help would be greatly appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Christine Rondeau


    Volunteer Forum Moderator

    Can you provide a link to your site please?

    Hi Christine, sure!

    Any help would be awesome! 🙂

    Christine Rondeau


    Volunteer Forum Moderator

    Masonry isn’t working on Chrome either.
    Do you have jQuery enqueued properly?
    That should be done in your functions.php file.
    I don’t see a call to jQuery anywhere in your source code.

    Hi Christine,

    Thanks for the quick reply! Here’s what I have in my header. I’m guessing this isn’t doing the trick?

    <!-- Include jQuery -->
    <?php wp_enqueue_script('jquery'); ?>

    I tried to call this up in the Functions using this below, but that didn’t seem to help the issue:

    function my_init() {
    	if (!is_admin()) {
    add_action('init', 'my_init');

    Any idea what I’m doing wrong here? Once again, thanks for all your help!

    Okay, so, this keeps getting more confusing, haha. I used this code to test out my jQuery:

    <script type='text/javascript' src=''></script>
    <script type="text/javascript">
    	$("div").css("border", "3px solid red");

    It worked in Firefox and Mac Chrome, but didn’t in Safari or PC Chrome. So, clearly there’s a major conflict of some sort.

    I went through and deactivated all my plugins, but that didn’t do the trick. I stripped out my enqueue reference for jQuery in the functions and header. All of this didn’t seem to fix my issue.

    Any ideas? Anyone?


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Masonry in WP for Safari’ is closed to new replies.