Skip to content

Instantly share code, notes, and snippets.

Avatar

cookbookplugin

View GitHub Profile
View style.css
body .cookbook-instagram {
background: #333;
color: #fff;
margin: -20px auto 0;
padding: 20px;
}
body .cookbook-instagram h4 {
color: #fff;
margin: 3px 0 5px;
@cookbookplugin
cookbookplugin / functions.php
Last active May 16, 2018
Add Instagram Info to Recipe Card
View functions.php
<?php
//* Do NOT include the opening php tag
add_action( 'cookbook_recipe_after', 'cookbook_recipe_instagram', 10 );
/**
* Display the Instagram Information.
*/
function cookbook_recipe_instagram() {
echo '<div ' . cookbook_get_attr( $recipe, 'instagram' ) . '>';
echo '<i class="fa fa-instagram fa-5x fa-pull-left"></i>';