WordPress.org

Ready to get started?Download WordPress

Forums

Simple Staff List
Using the bio excerpt on the staff member list page (9 posts)

  1. Mike Smith (madebyguerrilla)
    Member
    Posted 9 months ago #

    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/

  2. Nick Ciske
    Member
    Posted 9 months ago #

    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.

  3. Mike Smith (madebyguerrilla)
    Member
    Posted 9 months ago #

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

  4. farnott
    Member
    Posted 5 months ago #

    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!

  5. optimus203
    Member
    Posted 2 months ago #

    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?

  6. farnott
    Member
    Posted 2 months ago #

    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.

  7. optimus203
    Member
    Posted 2 months ago #

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

  8. farnott
    Member
    Posted 2 months ago #

    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!

  9. h2ofilters
    Member
    Posted 2 months ago #

    @farnott thanks for the tips.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.