Looking for support? You can access the support system via your account.
Clay Tanner
Forum Replies Created
-
Clay Tanner in reply to:
X theme – masonry problem(Private) April 14, 2017 at 9:35 am #103030Hey Trevor,
I’ve been talking to theme.co support, and they provided me with the following code:
(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); $('#x-isotope-loading').stop(true,true).fadeOut(300); $('#x-iso-container > .hentry').each(function(i) { $(this).delay(i * 150).animate({'opacity' : 1}, 500); }); $("#x-iso-container").isotope({}); }); }(jQuery));
This code finally solved my problem. I just wanted to leave it here in case anyone else looking for a solution may find it.
Thank you guys and happy holidays!
Clay
Clay Tanner in reply to:
X theme – masonry problem(Private) April 7, 2017 at 1:10 pm #101949I found this thread: https://theme.co/apex/forums/topic/ajax-plugin-load-issues-with-themex/
Reading it makes me think they’re not very cooperative/helpful when it comes to “third party” plugins. 🙁However I found out that masonry view in X theme makes use of an older version of Isotope: http://isotope.metafizzy.co/
This is how Isotope is called in index:
<?php x_get_view( 'global', '_script', 'isotope-index' ); ?> <div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>">
And it is handled by _script-isotope-index.php:
<?php // ============================================================================= // VIEWS/GLOBAL/_SCRIPT-ISOTOPE-INDEX.PHP // ----------------------------------------------------------------------------- // Isotope script call for index output. // ============================================================================= $is_rtl = is_rtl(); ?> <script> jQuery(document).ready(function($) { <?php if ( $is_rtl ) : ?> $.Isotope.prototype._positionAbs = function( x, y ) { return { right: x, top: y }; }; <?php endif; ?> var $container = $('#x-iso-container'); $container.before('<span id="x-isotope-loading"><span>'); $(window).load(function() { $container.isotope({ itemSelector : '.x-iso-container > .hentry', resizable : true, filter : '*', <?php if ( $is_rtl ) : ?> transformsEnabled : false, <?php endif; ?> containerStyle : { overflow : 'hidden', position : 'relative' } }); $('#x-isotope-loading').stop(true,true).fadeOut(300); $('#x-iso-container > .hentry').each(function(i) { $(this).delay(i * 150).animate({'opacity' : 1}, 500); }); }); $(window).smartresize(function() { $container.isotope({ }); }); }); </script>
Clay Tanner in reply to:
X theme – masonry problem(Private) April 6, 2017 at 2:50 pm #101751No, it was standard blog view, I changed it to masonry today.
However I can’t seem to figure this out, I’m trying to use the code you provided in every possible way I can think of, but I always get JS error, like “is not a function” etc.
Is there any way you could look take a look at it?
Clay Tanner in reply to:
Ajax problems(Private) April 5, 2017 at 9:55 am #101513Oh man, that is awesome. Thank you so much Trevor!
Clay Tanner in reply to:
Ajax problems(Private) April 4, 2017 at 2:31 pm #101374This reply has been marked as private.Clay Tanner in reply to:
Ajax problems(Private) April 4, 2017 at 2:24 pm #101369This reply has been marked as private.Clay Tanner in reply to:
Ajax problems(Private) April 4, 2017 at 1:03 pm #101353Alright, I created a test website to show it in action. Looks like I was wrong, it does not seem to work for default ‘post’ type either.
http://junkie.tk/blog -> this one uses the default post type and ajax mode, not working
http://junkie.tk/videos -> this one uses custom post type video and uses ajax mode, not working
http://junkie.tk/photos -> this one uses custom post type photo and doesn’t use ajax, is workingInfo:
WP 4.7.3
X Theme 4.6.4Plugins:
Cornerstone
CPT UI
Search & Filter Pro
Widget Logic -
AuthorPosts