Hi, i tried reading the This post but i dont understand anything from it..
i tried to clone my template single.php and rename it single-staff-member.php and i added your provided code to it, but still when i click “View staff member” from the edit member page, i land on a 404 page..
Would it be possible to update the plugin so it has a staffmember site from beginning?
My single-staff-member.php looks like this:
<?php
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 = 'https://www.twitter.com/' . $custom["_staff_member_tw"][0];
$li_url = $custom["_staff_member_li"][0];
if(has_post_thumbnail()){
$photo_url = wp_get_attachment_url( get_post_thumbnail_id() );
$photo = '<img class="staff-member-photo" src="'.$photo_url.'" alt = "'.$title.'">';
}else{
$photo_url = '';
$photo = '';
}
$email_mailto = '<a class="staff-member-email" href="mailto:'.antispambot( $email ).'" title="Email '.$name.'">'.antispambot( $email ).'</a>';
?>
<?php
/**
* The Template for displaying all single posts.
*
* @package vantage
* @since vantage 1.0
* @license GPL 2.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php if( siteorigin_setting('navigation_post_nav') ) vantage_content_nav( 'nav-below' ); ?>
<?php if ( comments_open() || '0' != get_comments_number() ) : ?>
<?php comments_template( '', true ); ?>
<?php endif; ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>