Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mintymurray

    (@mintymurray)

    I was hoping we would have received some input from the creator by now 🙁

    It is clearly possible, we just need a few pointers!

    Thread Starter mintymurray

    (@mintymurray)

    OK, so I have tried to help myself, but it still isn’t working.

    I have created the single-staff-member.php in my themes folder, and pasted the following code in (including the existing code from single.php):

    <?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		= 'http://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 get_header(); ?>
    
    	<div id="wrap">
    		<div id="content">
    
    		<?php if (have_posts()) : while (have_posts()) : the_post();
    
    			get_template_part( 'loop', 'single' );
    
    		endwhile; ?>
    
    		<?php endif; ?>
    
    		<?php comments_template(); ?>
    
    	</div>
    
    		<?php get_sidebar(); ?>
    	</div>
    <?php get_footer(); ?>

    I have then changed the ‘Staff Loop Template’ to the following:

    [staff_loop]
    <div class="staff-member-container">
    <a href="http://www.mini-3.co.uk/internal/wp/[staff-name-slug]"> [staff-name-formatted]
    <img class="staff-member-photo" src="[staff-photo-url]" alt="[staff-name] : [staff-position]"></a>
     <div class="staff-member-info-wrap">
     [staff-position-formatted]
     </div>
     </div>
    [/staff_loop]
    <div style="clear:both;"></div>

    And the Staff Page CSS to:

    /*  div wrapped around entire staff list  */
    div.staff-member-listing {
    
    }
    
    /*  div wrapped around each staff member  */
    div.staff-member {
    	padding-bottom: 2em;
    	border-bottom: thin dotted #aaa;
    }
    
    /*  "Even" staff member  */
    div.staff-member.even {
    
    }
    
    /*  "Odd" staff member  */
    div.staff-member.odd {
    	margin-top: 2em;
    }
    
    /*  Last staff member  */
    div.staff-member.last {
    	padding-bottom: 0;
    	border: none;
    }
    
    /*  Wrap around staff info  */
    .staff-member-info-wrap {
    	float: left;
    	width: 70%;
    	margin-left: 3%;
    }
    
    /*  [staff-bio-formatted]  */
    div.staff-member-bio {
    
    }
    
    /*  p tags within [staff-bio-formatted]  */
    div.staff-member-bio p {
    
    }
    
    /*  [staff-photo]  */
    img.staff-member-photo {
    	float: left;
    }
    
    /*  [staff-email-link]  */
    .staff-member-email {
    
    }
    
    /*  [staff-name-formatted]  */
    div.staff-member-listing h3.staff-member-name {
    	margin: 0;
    }
    
    /*  [staff-position-formatted]  */
    div.staff-member-listing h4.staff-member-position {
    	margin: 0;
    	font-style: italic;
    }
    
    /* Clearfix for div.staff-member */
    div.staff-member:after {
    	content: "";
    	display: block;
    	clear: both;
    }
    
    /* Clearfix for <= IE7 */
    * html div.staff-member { height: 1%; }
    div.staff-member { display: block; }

    When I navigate to the single person page, it looks the same as it did before.
    If I remove the code that is in the single.php from the single-staff-member.php and then refresh the staff member page, it is blank. So at least I know the changes have affected something.

    Any help to get this last bit sorted would be amazing!

    Thread Starter mintymurray

    (@mintymurray)

    goodness, I didn’t think I was asking too much..

    Thread Starter mintymurray

    (@mintymurray)

    Shameless bump..

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