Created
August 18, 2014 17:19
-
-
Save bhubbard/683f7ed6c3566a3ee57f to your computer and use it in GitHub Desktop.
Here are php examples on how to rename slugs for WooCommerce Our Team Plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Change 'Our Team' Archive Slug */ | |
function woothemes_our_team_custom_archive_slug( $archive_slug ) { | |
$new_archive_slug = _x( 'agents', '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' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Change 'Our Team' Single Slug */ | |
function woothemes_our_team_custom_single_slug( $single_slug ) { | |
$new_single_slug = _x( 'agent', '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' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment