Support

Account

Home Forums General Issues Category Page Reply To: Category Page

  • Hi @mccawphoto

    The code:

    <?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();	

    Is not valid.

    Please read the get_posts documenation to understand how to loop over the posts.
    Perhaps you intended to use WP_Query instead? Please research this as well.

    Thanks
    E