WordPress.org

Ready to get started?Download WordPress

Forums

Our Team by WooThemes
category slug to something else? (3 posts)

  1. Samantha
    Member
    Posted 6 months ago #

    Hello,

    Would like to change 'team-member' to 'yoga-instructors'. How can this be done? Thank you!

    https://wordpress.org/plugins/our-team-by-woothemes/

  2. Amber
    Member
    Posted 6 months ago #

    Hey Samantha,

    This solution should work, just add the code to the fuctions.php of your theme:

    /* Change 'Our Team' Single Slug */
    function woothemes_our_team_custom_single_slug( $single_slug ) {
    	$new_single_slug = _x( 'yoga-instructor', 'single post url slug', 'our-team-by-woothemes' );
    	return $new_single_slug;
    }
    add_filter( 'woothemes_our_team_single_slug', 'woothemes_our_team_custom_single_slug' );

    The default archive slug to view all team members is "team-members". Additionally add the following snippet to adjust your archive slug.

    *Note: If you already have a page with a slug that uses "yoga-instructors" that you are trying to display team members on via the shortcode you might run into a bit of conflict with the archive slug listed below. If so then change the archive slug from yoga-instructors to yoga-instructors-archive

    /* Change 'Our Team' Archive Slug */
    function woothemes_our_team_custom_archive_slug( $archive_slug ) {
    	$new_archive_slug = _x( 'yoga-instructors', 'post archive url slug', 'our-team-by-woothemes' );
    	return $new_archive_slug;
    }
    add_filter( 'woothemes_our_team_archive_slug', 'woothemes_our_team_custom_archive_slug' );

    After adding the snippets re-save your permalink settings to save your new slugs.

  3. Samantha
    Member
    Posted 6 months ago #

    Hey Amber,

    It worked! Thank you SO much!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.