Sign in

Add The Only Eats Nutrition Button to a Wordpress Template

Follow these instructions to add the onlyeats nutrition button to all posts on a wordpress site. This way, you don't have to insert it manually with each post.

If you would rather insert it on a per-post basis on Wordpress, follow these instructions instead.
If you are not using Wordpress at all, you should start here.

The button is intelligent and will not appear on posts in which no ingredients appear.

Instructions

1. In your admin panel, navigate to Appearance > Editor to edit your site's current theme.

2. Then, select Single Post (single.php) from the Templates list on the right side of the screen.

3. Paste in the following code after the line that starts with get_template_part. If you are using a theme other than the default, your single.php may look different, but should follow the same structure.


echo '<br /><script async src="https://www.onlyeats.com/js/nutrition.min.js"></script><a href="https://www.onlyeats.com" class="onlyeats-nutrition">Only Eats</a><br />'; Click here to copy

You should see something like this:



If you run into any issues, feel free to reach out to Only Eats support: oecooking@gmail.com.


Welcome to Only Eats

Please continue with Facebook or Google to save recipes.
Continue with Facebook
Continue with Google

By signing in, you agree to our terms of service.