• Resolved pahroblem

    (@pahroblem)


    Hey great plugin

    Trying to get it to work in a Query loop

    heres my code

    <div class="content-container">
    
    <?php
    $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
    $args = array(
    'post_type' => array( 'post', 'review'),
    'posts_per_page' => 8,
    'paged' => $paged
    );
    $the_query = new WP_Query( $args );
    ?>
    <?php $post_counter=0; ?>
    <?php if ( $the_query->have_posts('paged') ) : ?>
    <?php while ( $the_query->have_posts('paged') ) : $the_query->the_post('paged'); ?>
    
    <div id="post-item"><div class="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    <a href="<?php echo the_permalink(); ?>">
    
       <div class="post-image">
    
                 <span class="wrapper-1">
    
                  <?php
    		echo get_the_post_thumbnail($post->ID, 'plant-thumb');
                  ?>
                       <span>
    
                        <?php
                          // Get the Name of First Category
                          $category = get_the_category();
                          echo $category[0]->cat_name;
                        ?>
    
                       </span>
    
                 </span>
    
       <div class="item-overlay">
    
          <div class="post-title"><h4 class="title"><?php the_title(); ?></h4></div>	
    
          <div class="post-author">
    
          <h2>by</h2><?php echo get_the_author(); ?>
    
          </div> <!-- post author -->
    
          <div class="post-date">
    
          <h2>on</h2><?php echo get_the_date(); ?>
    
          </div> <!-- post-date -->   
    
       </div> <!-- item-overlay -->  
    
       </div> <!-- post-image -->
    
    </a>
    
    </div> <!-- post-ID -->
    </div> <!-- post-item -->
    
    <?php
    $post_counter++;
    if ($post_counter == 8) { ?>
    
    <div class="ad-box-300x250">
    
    <SCRIPT language="Javascript">
    var cpmstar_rnd=Math.round(Math.random()*999999);
    var cpmstar_pid=57604;
    document.writeln("<SCR"+"IPT language='Javascript' src='//server.cpmstar.com/view.aspx?poolid="+cpmstar_pid+"&script=1&rnd="+cpmstar_rnd+"'></SCR"+"IPT>");
    </SCRIPT>
    </div>
    
    <?php } ?> 
    
    		<?php endwhile; ?>
    <div class="post-pagination">
    
    <div class="post-next">
    </div>
    </div>
    <?php wp_reset_postdata(); ?>
    <?php else : ?>
    <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    <?php endif; ?>
    
    </div>	<!-- content-container -->

    It comes up with “no posts to show” under the first loop. How do i fix this? thanks

    Heres the website http://www.gamersgreed.com

    https://wordpress.org/plugins/unlimited/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author plugin.builders

    (@pluginbuilders)

    Have you enabled the plugin? It’s files are not loaded in the home page. You also need to check Enable field in Unlimited settings page.

    Furthermore, you need to put in CSS selectors for post container and the pagination element, have you done this?

    Plugin Author plugin.builders

    (@pluginbuilders)

    Since you haven’t written back I’m assuming the problem has been fixed, and marking this thread as resolved. Write back if you’ve any problems.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Not loading posts’ is closed to new replies.