Home Forums General Issues Category Page Reply To: Category Page

  • Yes, the page breaks after the navigation at the top of the page.

    Now I have this error showing up where the page breaks:

    “Fatal error: Call to a member function have_posts() on a non-object in /home/senroctech/public_html/wp-content/themes/Senroc/banner-cat.php on line 66”

    Here is my code where the page breaks:

    <?php $posts = get_posts(array(
                	'post_type' => 'siteinfo',
                    'posts_per_page' => -1
    	$phone = get_field('phone_number');	  
    if ( $posts->have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();		  
    <div class="phone">
       <p><img class="phone-img" src="<?php bloginfo('template_directory'); ?>/images/phone.png" alt="<?php bloginfo('name'); ?>" /><span><?php echo $phone; ?></span></p>
       <?php endwhile;  
    endif; ?>