Create a staff page
-
Im trying to figure out a way to build a staff page where i present the staff. I found a youtube tutorial which showed me how to do it with Advanced Custom Fields.
I should then create a page called page-staff.php and copy page.php and enter this code:<ul class="staff"> <?php $recentPosts = new WP_Query(array('posts_per_page' => -1, 'post_type' => array('staff') )); while( $recentPosts->have_posts() ) : $recentPosts->the_post(); ?> <div class="thumb"><a>"><?php the_post_thumbnail('thumbnail') ?></a></div><br /> <p class="info vcard"> <span class="name"><a>"><?php the_title(); ?></a></span><br /> <span class="title"><?php the_field('job_title'); ?></span><br /> <span class="email"><a>"> <?php the_field('email'); ?></a></span><br /> <span class="phone"><?php the_field('phone'); ?></span><br /></p>This list the staff with the thumbnail after eachother. I would like to sort the staff in a table grid. Any ideas on how to rewrite the php code? My php knowledge is kind of basic.
I would like to sort the staff like on this page:
https://wistia.com/about/yearbook
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Create a staff page’ is closed to new replies.