• Resolved marcorm69

    (@marcorm69)


    Hi all.

    I use the plugin in my blog, in more page (full blog, archive, category).
    In all page i have the same problem:

    1. The transition=”fade” working only for first “block” of posts (i am not like the “movement”);
    2. The loading icon not moves to the bottom of the page, but stays on top, hover the posts;

    This is my repeater

    <article class="ms-item col-lg-6 col-md-6 col-sm-6 col-xs-12" id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
    	<?php if (has_post_thumbnail()) : ?>
    		<div class="article-preview-image">  <!-- Thumb -->
          <?php the_post_thumbnail('large'); ?>
    			<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><i class="dashicons dashicons-visibility"></i></a>
                <div class="blog-category">
    				<?php 	$categories = get_the_category();
                        	echo esc_html( $categories[0]->name ); ?>
    			</div>
    			<div class="postdate bg-lightgray headerfont">
    				<span class="postday"><?php the_time('d'); ?> </span>
    				<?php the_time('F'); ?>
    			</div>
    		</div> <!-- End thumb -->
    		<h2 class="post-title"><a href="<?php the_permalink(); ?>" class="post-title-link"><?php the_title(); ?></a></h2>
    <h2 class="post-author">by <?php the_author(); ?></h2>
      <div class="post-excerpt">
    			<?php custom_excerpt(); ?>
    
    		</div>
        <?php else : ?>
        <?php endif; ?>
        <div class="clearfix"></div>
      <!-- <?php get_template_part('templates/entry', 'meta-subhead'); ?>  -->
    <div class="readmore"><a href="<?php the_permalink(); ?>" class="btn btn-green btn-block">READ MORE</a></div>
    	<div class="clearfix"></div>
    </article> <!-- End Article -->

    This my shortcode for the Blog Grid page (insert when i created “New Page”)
    [ajax_load_more post_type="post" transition="fade" posts_per_page="3"]

    You can see the result here:
    http://marcomiserini.altervista.org/blog/bloggrid/

    Or, code in archive.php:
    echo do_shortcode( '[ajax_load_more category="' . $cat_slug . '"]');
    (result in: http://marcomiserini.altervista.org/blog/category/fotografia/)

    and
    echo do_shortcode( '[ajax_load_more month="' . get_the_date('m') . '" year="' . get_the_date('Y') . '"]');
    (result in: http://marcomiserini.altervista.org/blog/2016/03/)

    Any suggestions?

    Thanks,
    Marco

    (sorry for my bad english)

    https://wordpress.org/plugins/ajax-load-more/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter marcorm69

    (@marcorm69)

    For the second issues the problem is the height of ajax container.
    In the example page the element <div> or

      with class=”alm-listing alm-ajax ” have a height equal all show post, in my page the height is 0.
      But the elements are inserted by plugin.

    Plugin Author Darren Cooney

    (@dcooney)

    Hi marcorm69,
    When using masonry you will want to to target the ul.alm-listing div. Not the parent container – in your case ‘.main’.

    See the code example?
    http://connekthq.com/plugins/ajax-load-more/examples/masonry/#javascript
    var $container = $('#masonry-grid ul');

    You should also set images_loaded=”true” to preload images before displaying the ajax loaded data.

    Cheers,

    Thread Starter marcorm69

    (@marcorm69)

    Thank you dcooney!!
    Perfect!

    Plugin Author Darren Cooney

    (@dcooney)

    You’re welcome!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fade and Loading icons’ is closed to new replies.