SimmerWP – Simpler Permalink

When using the SimmerWP plugin, it lets you configure the permalink settings, but they all use the same base. So your single recipes end up like /recipes/recipe/[recipe-name]. The code below simplifies it to /recipe/[recipe-name]

/**
 * Simmer Post Type Args 
 *
 */
function be_simmer_post_type_args( $args ) {
	$args['rewrite']['slug'] = 'recipe';
	return $args;
}
add_filter( 'simmer_register_recipe_args', 'be_simmer_post_type_args' );

/**
 * Simmer Category Args
 *
 */
function be_simmer_category_args( $args ) {
    $args['rewrite']['slug'] = 'recipe-category';
    return $args;
}
add_filter( 'simmer_register_category_args', 'be_simmer_category_args' );

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk