• 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)
  • Hello!

    I think that you can even do this in your Page’s Editor, without having to create php pages and so on. It looks pretty straight forward.

    There are also a lot of plugins to choose from – https://ww.wp.xz.cn/plugins/search/staff/.

    Thread Starter djxtc1

    (@djxtc1)

    Thanks, tried several plugins but didnt find any that worked exactly how i wanted. The one im doing now works fine, the only issue is the layout of the results.

    Moderator bcworkz

    (@bcworkz)

    The page you linked to appears to be a table grid layout like you asked for, so I’m marking your topic as resolved. If this is not the case, please explain in more detail what sort of layout you want.

    Thread Starter djxtc1

    (@djxtc1)

    The page i linked to is exactly what im trying to accomplish with the code, thats not my own page.

    What i need help with is to use the output from my code and style it like the page i linked to.

    Moderator bcworkz

    (@bcworkz)

    I see. Resolved status undone. Please provide a live link to the page you need help with.

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

The topic ‘Create a staff page’ is closed to new replies.