WordPress.org

Ready to get started?Download WordPress

Forums

Simple Staff List
Change "staff-member/" to something else (11 posts)

  1. mjb238
    Member
    Posted 11 months ago #

    Hello

    Thanks for writing this plugin.

    Apologies if this has been asked before. Is there a simple way to changing the "staff-member/" part of the URL to something else?

    I'd like it to say "people/" for example.

    Thanks

    Mike

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

  2. Brett Shumaker
    Member
    Plugin Author

    Posted 10 months ago #

    On line 141 of simple-staff-list.php, when I'm setting up the staff-member custom post type I set the slug with
    'rewrite' => array('slug'=>'staff-members','with_front'=>false),

    Change that to:
    'rewrite' => array('slug'=>'people','with_front'=>false),

  3. gsbrock
    Member
    Posted 8 months ago #

    Just a note, having this as a user-definable slug without having to edit the plugin source would be very cool, especially if it could be configured to persist through plugin updates!

  4. esaner
    Member
    Posted 5 months ago #

    When I do this I get a page not found error when viewing individual staff pages. Anyone else have this problem? Fixes?

  5. esaner
    Member
    Posted 5 months ago #

    Ah. The error is because the slug cannot be the same as the page permalink for the page where the [simple-staff-list] shortcode is entered.

    See here: http://wordpress.org/support/topic/pages-and-custom-types-cannot-have-the-same-name-so-how-to-structure-permalinks?replies=20

  6. esaner
    Member
    Posted 5 months ago #

    What happens is that WP looks for an archive of the simple staff list custom post type at http://www.example.com/'slug' and never sees the page with the same permalink.

    To get around this, I created an archive page in my child theme(archive-simple-staff-list.php) and called the short code with:

    echo do_shortcode('[simple-staff-list]')

    Works great.

  7. esaner
    Member
    Posted 5 months ago #

    When changing the URL slug, you may also want to change line 113, which sets the page title in the header and the browser tab title.

    'name' => _x('Staff Members', 'post type general name'),

  8. farnott
    Member
    Posted 5 months ago #

    I've changed line 141 as suggested and that does indeed change the permalink but as esaner discovered, the individual staff pages are now not found. I haven't even created a page to list the staff yet, so I don't think it's a problem with the slugs being the same? Any help much appreciated!

  9. farnott
    Member
    Posted 5 months ago #

    Please ignore my last post, it was my own stupid mistake. I might as well confess it - mod_rewrite was not enabled. I know, like it said, stupid mistake! But I'm working on a different server and in my haste to get a staff plugin working I never bothered to check any other urls first!

  10. farnott
    Member
    Posted 5 months ago #

    I would like to be able to show only the first say 50 words of each bio when using the simple-staff-list shortcode, with a 'read more' link.

    I've got a read more link working, but I can't figure out a nice way of only showing part of the bio. I could modify the plugin I suppose but I'd prefer not to... Anyone suggest a neat way to show just part of each bio?

  11. farnott
    Member
    Posted 5 months ago #

    just realised I posted in the wrong place, sorry (new-ish to WordPress)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.