Support » Plugin: Simple Staff List » Disable archive and staff member page

  • Resolved Auk


    Great plugin!

    Just one problem – as it is a custom post type, it creates a page for individual staff members and an archive page, neither of which I can disable or edit.

    I’ve tried changing ‘has_archive’ => true, to ‘has_archive’ => false, without success. Also, this method will be over-written when the plugin is updated.

    The individual staff member pages are potentially useful if they can be made to display the same content as produced by the short code, but they only show the image and staff name. I’ve tried creating a content-sslp_staff_member.php but this doesn’t work.

    I’d like to be able to disable the archive page completely, and, either disable the individual staff member pages or be able to customise them.

    I’d like these customisations to stick when the plugin is updated.

    Any ideas?

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I agree, Great Plugin !

    I would like to change the template used for the individuals page.

    How can I add the [staff-bio] info to the individuals staff member page ?

    (I can’t find how http://wp-site/staff-members/fred-bloggs/ translates to a php template, then how can one add the [staff-bio] info to that template)

    Halfway there, details the naming convention for custom type post templates.

    The creation of the single-staff-member.php and loop-single-staff-member.php templates in the theme directory (copied from single.php and loop.php) are being used to generate the individuals staff page.

    Now how can the [staff-bio] be added …

    By copying some of the code from the plugins user-view-show-staff-list.php file I managed to get the image and bio showning on each individuals page.

    The template code changes shown below worked for me:

    # diff single.php single-staff-member.php
    < get_template_part( 'loop', 'single' );
    > get_template_part( 'loop', 'single-staff-member' );
    # diff loop-single.php loop-single-staff-member.php
    >         <?php
    >           $custom = get_post_custom();
    >           $bio = $custom['_staff_member_bio'][0];
    >           $photo = '';
    >           if(has_post_thumbnail()){
    >             $photo = '<img class="staff-member-photo" style="float:right;" src="'.wp_get_attachment_url( get_post_thumbnail_id()).'" alt = "'.get_the_title().'">';
    >           }
    >         ?>
    >             <?php echo($photo); ?>
    <             <?php the_content(); ?>
    >             <?php echo($bio); ?>

    Peter, you’re a genius!
    Thank you.

    Now, I just need to disable the archive page that appears at http://wp-site/staff-members/ … Any ideas on with that one?

    Plugin Author Brett Shumaker


    Good job, guys.

    Auk: Setting has_archive to false should be enough. May need to flush your permalink settings by saving them in the admin or try clearing your cache. When I click your link, nothing comes up for me.

    Permalinks! I always forget to flush permalinks.
    Thank you, Brett.

    Plugin Author Brett Shumaker


    No worries.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable archive and staff member page’ is closed to new replies.