Support » Plugin: Simple Staff List » Using the bio excerpt on the staff member list page

  • I am working on a site that’s listing all of the staff members but when I use the [staff-bio] shortcode on the display template page in the admin panel, it’s spitting out the full bio instead of the excerpt text I’ve added.

    I need the overview page to show the excerpt of the bio only and then display the full bio on the single-staff-member.php template (which I have working) Is there any shortcode or any code to display the excerpt here instead of the full bio?

    Thanks

    http://wordpress.org/extend/plugins/simple-staff-list/

Viewing 8 replies - 1 through 8 (of 8 total)
  • It’s not the most elegant solution, but this will enable use of the excerpt in the template. Just replace the file (user-view-show-staff-list.php) in your plugin with the code from this gist:

    https://gist.github.com/nciske/6023538

    Then use these tags:
    [staff-excerpt]
    [staff-excerpt-formatted]

    Hopefully the author can enable this is the next update.

    Thread Starter Mike Smith (madebyguerrilla)

    (@madebyguerrilla)

    Thanks Nick and yeah, it seems like a feature that could/should be built in by default.

    I too would really like this feature! I’ve looked at the code on github but I think it must be out of sync with the current version of the plugin. I’m currently trying to work out if I can add a shortened version of the bio (or use the excerpt) to the shortcodes so that I can add it to the template instead of the [staff-bio-formatted] but I’m new to WP and a bit stuck right now!

    This is what would be ideal for me:

    [staff_loop]
    	<img class="staff-member-photo" src="[staff-photo-url]" alt="[staff-name] : [staff-position]">
    	<div class="staff-member-info-wrap">
    		[staff-name-formatted]
    		[staff-position-formatted]
    		[staff-bio-intro]
    		[staff-email-link]
    	</div>
    <div><a href="/people/[staff-name-slug]/">Read more</a></div>

    Or if there was some easy way of reducing the number of chars that are displayed in that loop, e.g.

    [staff_loop]
    	<img class="staff-member-photo" src="[staff-photo-url]" alt="[staff-name] : [staff-position]">
    	<div class="staff-member-info-wrap">
    		[staff-name-formatted]
    		[staff-position-formatted]
    		word_limiter_function([staff-bio])
    		[staff-email-link]
    	</div>
    <div><a href="/people/[staff-name-slug]/">Read more</a></div>

    Would really love to hear anyone’s suggestions as this plugin is almost perfect for my needs!

    dbp

    (@optimus203)

    I woudl like this feature too.

    Nick Ciske or anyone else, is there a way to include a link to the full bio after the excerpt is displayed?

    I gave up with the Simple Staff List and used custom post type instead then made a corresponding template. You can see it in action here:

    http://www.ponteland-tc.gov.uk/councillors/

    If anyone would like a more detailed explanation of what I did I’d be happy to provide it.

    dbp

    (@optimus203)

    @farnott – I would love to have that information. Thanks!

    OK I’ve just been retracing my steps and it’s quite in-depth. I can give you a quick overview which will hopefully get you in the right direction.

    I was quite new to WP when I tackled this so I used a plugin called Types which makes it easy to create custom post types and custom fields.

    Then after a lot of searching around and reading, I figured out that I needed 2 new files: a loop-staff.php and a single-staff.php in my theme folder. These are copies of the original loop.php and single.php files but with modified queries to get the correct data in a different order, paginated etc.

    Sorry that’s not much of a tutorial but this probably isn’t the right place for that anyway!

    @farnott thanks for the tips.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Using the bio excerpt on the staff member list page’ is closed to new replies.