Support » Plugin: Simple Staff List » An actual working Staff Member Page

  • Hi all,

    I’ve been trying to follow the various support threads for this plugin and have yet to see an actual solution. All I’d like to be able to do is click on a Staff Member, and view that page with populated data, like a Bio, a title, Contact Information, etc.

    This was talked about over the course of the last year in this thread, however, it was closed (no idea why) and the final reply didn’t provide an example of their working single-staff-member.php code.

    All I’d like to know is how to correctly create single-staff-member.php so that the Staff Member is shown and utilizes the basic Twenty Thirteen theme (I’m not worry about a custom theme right now, I just need this to work, as is, with the default theme).

    		global $post;
    		$custom 	= get_post_custom();
    		$name 		= get_the_title();
    		$name_slug	= basename(get_permalink());
    		$title 		= $custom["_staff_member_title"][0];
    		$email 		= $custom["_staff_member_email"][0];
    		$phone 		= $custom["_staff_member_phone"][0];
    		$fax 		= $custom["_staff_member_fax"][0];
    		$bio 		= $custom["_staff_member_bio"][0];
    		$prof 		= $custom["_staff_member_prof"][0];
    		$fb_url		= $custom["_staff_member_fb"][0];
    		$tw_url		= '' . $custom["_staff_member_tw"][0];
    		$li_url		= $custom["_staff_member_li"][0];
    			$photo_url = wp_get_attachment_url( get_post_thumbnail_id() );
    			$photo = '<img class="staff-member-photo" src="'.$photo_url.'" alt = "'.$title.'">';
    			$photo_url = '';
    			$photo = '';
    		$email_mailto = '<a class="staff-member-email" href="mailto:'.antispambot( $email ).'" title="Email '.$name.'">'.antispambot( $email ).'</a>';
     * The template for displaying all single posts
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
    get_header(); ?>
    <div id="primary" class="content-area">
    	<div id="content" class="site-content" role="main">
    	<?php while ( have_posts() ) : the_post(); ?>
    		<h1><?php the_title(); ?></h1> <!-- This is the Standard page title -->
    			<h3><?=$title?></h3> <!-- This is the Staff Memeber Title -->
    			<?=$photo?> <!-- This is the Staff Memeber Photo -->
    			<p><?=$bio?></p>  <!-- This is the Staff Memeber Bio -->
    			<?php the_content();?>
    	<?php endwhile; // end of the loop. ?>
    	</div><!-- #content .site-content -->
    </div><!-- #primary .content-area -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Since I don’t have the following code in my single-staff-member.php file:

    <?php get_template_part( 'content', get_post_format() ); ?>

    It is obviously not pulling from the Twenty Thirteen CSS.

    Could someone please tell me exactly what I need to do to get this PHP file to behave and utilize the theme’s CSS? Because the text as presented is not utilizing the theme of the CSS.

  • The topic ‘An actual working Staff Member Page’ is closed to new replies.