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]

<?php
/**
* 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' );
view raw functions.php hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

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

Let's Talk