I’m pretty active in the blogging community. I belong to a handful of Facebook and Google Plus groups where we help each other out. The one question I see a lot is “How do you create a recipe index that automatically updates itself?” I have answered this so many times, yet the question keeps popping up. The smart thing to do was write about it in one place, complete with screenshots. This post is for self-hosted WordPress sites only. Automatically updating your recipe archive involves a plugin, which is not available on Blogger or WordPress.com.
(In case you are not a food blog, this plugin automatically categorizes any category you write about, whether it is food, photography, traveling guides, or how to pamper your cat).
(And if you’re not a blogger at all, there will be a chocolate and peanut butter dessert tomorrow!)
Creating an automated recipe index is something I’ve been trying to do for years. There was no easy solution, no dedicated plug in. At least, not advertised as such. The plugin I found is called WP Category Post List plugin. You will not be messing with your template nor editing PHP. Instead, there is a line of code that you paste onto a brand new page (not post). The code is very easy to adjust, just as long as you follow the chart their website provides.
But before I get into how, let’s talk about why you need a recipe archive. Let’s say you find a new-to-you blog. You don’t know anything about the blog except for what is displayed on the home page. You like the recipes posted, so you want to see more. Go to the recipe archive, pick a category, and browse. Or let’s say you are struggling for ideas. Maybe you need to get dinner on the table in an hour. Or maybe your child needs cupcakes for tomorrow’s school event. You have your list of favorite bloggers, so you browse the recipe archive for ideas. And to be honest, most blogs’ search function isn’t very good.
By default, you can organize posts by category. However, it lists recipes by date, not by title. If you had a lot of posts, it would be several pages along, making it very cumbersome to find a certain recipe. You could have a really good cookie recipe on page 5, but I got tired after page 2. It happens. By categorizing posts by title on one page, you can easily scroll through all of the recipes within a few minutes.
Chances are, if you are still reading this, you already recognize the need for an index but do it manually. The problem with that is you forget or don’t have time and fall behind updating. I know myself too well and knew within two posts, I’d be behind. That’s where finding a plugin was critical. This part was frustrating for me. I knew what I wanted but couldn’t figure out how. I downloaded plugin after plugin and attempted every HTML code possible. Finally, I found the List Categories plugin that matched my needs if I manipulated it just right.
Are you ready to create an easy, automated recipe index? Good, let’s get started!
Some of my categories
1. Map out your recipe index. You need to know how you are going to break down your categories. Are you going to have a million pages like I do, breaking recipes down into specific categories such as cookies, cheesecake, and yeast breads? Are you going to have pretty broad categories, like Main Dishes, Desserts, and Drinks? If you do go with Main Dishes, are you going to group them all as one or are you going to break them down by type (Chicken, Beef, Seafood, etc)? This is important because each post needs to be assigned to the appropriate category. And yes, you can assign a post to more than one category.
2. Download and install the WP Category Post List plugin. Adjust the plugin settings, if necessary.
3. Create a new page (not post). Pick one category to focus on then title your page as such.
4. Now go to the developer’s website and click on Shortcode in the menu column. You are going to see a code. Each number represents a function. There is a chart that breaks down what each part of the code means. The default code shown is:
Please note – I put an extra space between [ and wp_cpl_sc; otherwise you wouldn’t be able to read my code as written. When you go to insert it, make sure you delete that space.
[ wp_cpl_sc cat_id=40 list_num=4 css_theme=2 sticky_post=”79″]
Let’s break it down:
- wp_cpl_sc – Abbreviated name of the plugin. Do not touch this.
- cat_id=40 – Category identity number. This determines what category will be displayed on the page. Each category is assigned a unique number.
- list_num=4 – The number of posts in the list that will be displayed on the page.
- css_theme=2 – What the list will look like. The plugin has 4 themes.
- sticky_post=”79″ – Post(s) that will appear at the very top of the list, regardless of alphabetical order. Each post is assigned a unique number.
The default code may be fine for some, but I wanted to customize it. If you scroll down on the Shortcode page, there is a table with different attributes. I read through them and decided what I wanted. As a result, here is my code:
[ wp_cpl_sc cat_id=63 css_theme=0 list_num=99 sort_using=4 show_author=false show_comments=false]
Let’s break it down:
- wp_cpl_sc – Do not touch this.
- cat_id=63 – Category identity number. In this case, 63 is my cheesecake category.
- css_theme=0 – What my list will look like. 0 is the Light Theme.
- list_num=99 – I want all of my posts to show up on one page. Since I’m not sure how many posts each category will have, I chose a high number.
- sort_using=4 – This determines what order the posts will be listed. 4 means listed in alphabetical order.
- show_author=false – Since I’m the only author, I didn’t feel that it was necessary to list my name.
- show_comments=false – I didn’t feel that showing the number of comments for each post was necessary.
To determine a category’s unique ID number, go to the Categories page. Hover over the desired category, and look at the bottom. You should see the URL appear. Towards the end of the URL, it lists a number. That is your ID number.
5. Go back to your new page (not post) in WordPress. Copy and paste the code here. You are welcome to add text before or after the code. Hit Publish when done.
6. Your new page is now ready! But wait – you’re not done just yet. Even though the page is created, you need a way to navigate to it. For me, I created a portal page. This is simply a page that directs you to other pages. To start, I created a new page (not post) and allowed it to show up in my navigation bar. Editing your navigation bar relies heavily on your theme, so I cannot provide details on how to do that. My theme has an option called “Menus” under the Appearance tab.
On this page, I used HTML to insert images. I created the buttons in Photoshop to attract attention. You can use text links as well. For each link, I linked it to the desired recipe page I just created.
7. Repeat these steps until your index is complete. It doesn’t have to be recipes either. I do the same thing for my photography category, which has its own navigation tab.
Enjoy your new index!
Update 04/23/13 – If your thumbnails are not showing up, make sure your posts have a Featured Image selected. The plugin pulls from that featured image for the thumbnail.