I have done a lot of Foodie Pro customizations. Countless, really. Over time, I have been asked to do a few fairly unique changes to the theme, in order to make it a bit more unique. I thought I would share one of those requests today: how to add a “jump to recipe” link to the post info.
The short description is that when you click on “jump to recipe”, the reader will link directly to the recipe in the post.
This tutorial is most helpful if you are comfortable working in your theme files. Remember to backup your work and I always recommend working directly in FTP so if you do make an error, you can easily revert your work.
While this information may very well apply to other Genesis themes, I am going to speak specifically to Foodie Pro, so feel free to modify as needed. I am also going to refer to the plugin Easy Recipe in this tutorial.
First, open your functions.php file in your FTP client and add this line of code:
This edits your post info and adds the jump link. If you want to style your post info as I have with the jump link to the right, in your stylesheet (style.css), add:
At this point, your code will exist on single posts but not function. If using the Easy Recipe plugin, you will want to wrap the recipe in a div id. As of 10/15/15, this is necessary. I am told that the next update to Easy Recipe will include the div id, so depending on when you read this, this next part may or may not be necessary.
In FTP, navigate to plugins > easyrecipe > styles > find what style you use (the style.text file within each style folder has the description if you are not sure). Within your style’s folder is a style.html file.
Find the line:
and change it to
This gets trickier if you have more than one recipe in a post. I’m actually not going to go there in this tutorial because basically you have to call the specific recipe ID in two places and that will just complicate this post, frankly.
1. Add the custom post info with jump link to functions.php
2. Style the post info and jump link
3. Wrap Easy Recipe div in style.html
I received permission to post this information from Easy Recipe.