Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Staff Posts Permalink Slug with “Staff-Group”

Home / Forums / Virtue Theme / Staff Posts Permalink Slug with “Staff-Group”

This topic is: Awaiting Feedback
[Awaiting Feedback]
Posted in: Virtue Theme
August 3, 2023 at 7:30 pm

Hey team

In Virtue, I have a website using the Staff Posts. I have staff in different groups, for example: Nurse, Trustee, Social Worker etc.

In the single staff page – the previous / next buttons don’t seem to respect the staff group… so when looking at a staff member in the Nurse group – clicking on next might show a bio from someone in Trustee group etc…. But – I only want to show the Next / Previous for staff in the same group / taxonomy.

So – if in the Nurse group, the permalink should be: example.com/staff/staff-group-name/staffmember and when clicking through prev / next it should stay with the “staff-group-name” group.

In My functions file I have tried this, but it’s not working – please advise.

// Changes the "staff" slug to team - and show the taxonomy "staff-group"
add_filter( 'register_post_type_args', 'wpse247328_register_post_type_args', 10, 2 );
function wpse247328_register_post_type_args( $args, $post_type ) {
if ( 'staff' === $post_type ) {

$args['rewrite'] = array (
'slug' => 'team/%staff-group%',
'with_front' => false,
'has_archive' => 'staff-group',
);

In the Virtue theme > lib > post-types.php file, the ‘rewrite’ => array( ‘slug’ => $staff_group_slug ) = staff-group?

  • The forum ‘Virtue Theme’ is closed to new topics and replies.