FacetWP is a beautiful setup for the recipe index, but overly complicated, and costs money. It also encourages visitors to stay on a single page that's dynamically updated, rather than jumping into categories and posts.
Navigating to categories and posts is preferred because it generates additional pages-per-visit, decreasing bounce rates. Having visitors on the category pages (with descriptions) helps sell them on the value of those recipes, rather than just arbitrarily listing them.
This is how you set up a Foodie Pro-style recipe index that doesn't use FacetWP.
Note: these customizations will be lost in a theme update. Because it uses a page template, it can't be done in the code snippets plugin. We'll be introducing a new method of doing recipe indexes with the Feast Plugin in late 2019.
Backup your site
Before taking on any customization, always back up your site.
Preferably, you'll do this on a staging site, so that you can reset it if anything goes wrong.
1. Edit functions.php
Replace the following:
genesis_register_sidebar( array( 'id' => 'recipe-index', 'name' => ( 'Recipe Index Sidebar', 'cookd' ), 'description' => ( 'This is the sidebar for the recipe index.', 'cookd' ), ) );
With:
// foodie pro style recipe index /* genesis_register_sidebar( array( 'id' => 'recipe-index', 'name' => __( 'Recipe Index Sidebar', 'cookd' ), 'description' => __( 'This is the sidebar for the recipe index.', 'cookd' ), ) ); */ genesis_register_sidebar( array( 'id' => 'recipe-index-search', 'name' => __( 'Recipe Index: Search', 'cookd' ), 'description' => __( 'This is the recipe index search area, designed for the Categories, Archive, and Search widgets.', 'cookd' ), ) ); genesis_register_sidebar( array( 'id' => 'recipe-index-featured-posts', 'name' => __( 'Recipe Index: Featured Posts', 'cookd' ), 'description' => __( 'This is the recipe index posts area, designed for the "Cookd Pro - Featured Posts" widgets.', 'cookd' ), ) ); // end foodie pro style recipe index
2. Edit templates/page-recipe.php
Replace the entire contents with this file: https://gist.github.com/feastdesignco/4b82ab0de63b5030ddbc9b260c1755d4
3. Follow the Foodie Pro Recipe Index tutorials
Found here: Configure Foodie Pro Recipe Index
Note: do not import the widgets - follow the setup instructions.
4. Small CSS tweak
Head over to your "Additional CSS" and add the following:
.page-template-page-recipes .sidebar, .page-template-page-recipes .content { order: inherit; }
Alex says
Hi,
When I try to edit the functions.php as described, i get this message:
"Your PHP code changes were rolled back due to an error on line 66 of file wp-content/themes/cookdpro-v420/functions.php. Please fix and try saving again.
syntax error, unexpected ','
I copied everything directly from this page so I'm not sure what I'm doing wrong. Help!
Thanks,
Alex
Skylar Bowker says
Thanks for pointing this out Alex! It looks like this wasn't copied over properly from the development area. It's been updated and the code should work now!