This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Category Index | |
* Created By: Lauren Gray Designs | |
* URL: http://oncecoupled.com | |
*/ | |
/* Exclude categories: */ | |
$args = array( | |
'type' => 'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # EXAMPLE TO REGISTER AND POSITION ANY NEW WIDGET AREAS | |
/** | |
* Created By: Lauren Gray Designs | |
* URL: http://oncecoupled.com | |
*/ | |
//* POSTS Register new widget area | |
lgd_register_sidebars(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Enqueue child theme JavaScript. | |
add_action( 'wp_enqueue_scripts', 'lgd_enqueue_js' ); | |
//* Load additional javascript. | |
function lgd_enqueue_js() { | |
wp_enqueue_script( 'social-by-post', get_stylesheet_directory_uri().'/js/social-by-post.js' , '', '', true ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* add link at beginning of excerpt */ | |
add_filter( 'genesis_entry_content' , 'lgd_clickable_open', 1 ); | |
function lgd_clickable_open() { | |
if (is_home() || is_front_page() || is_archive() ) { | |
printf( '<a href="%s" alt="%s">', get_permalink(), the_title_attribute( 'echo=0' ) ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Use to insert images into your RSS content. Good for use with Feedburner. | |
*/ | |
add_filter('the_excerpt_rss', 'featuredtoRSS'); | |
add_filter('the_content_feed', 'featuredtoRSS'); | |
function featuredtoRSS($content) { | |
global $post; | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$content = '' . get_the_post_thumbnail( $post->ID, 'large', array( 'style' => 'display: block; max-width: 100%; height: auto; margin: 10px 0;' ) ) . '' . $content; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set default fallback image | |
* Modified from: https://gist.github.com/GaryJones/7070243 | |
* See: genesis\lib\functions\image.php | |
*/ | |
add_filter( 'genesis_get_image_default_args', 'prefix_stop_auto_featured_image' ); | |
function prefix_stop_auto_featured_image( $args ) { | |
if ( ! isset( $args['context'] ) /*|| 'archive' !== $args['context']*/ ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Category Index | |
* Created By: Lauren Gray Designs | |
* URL: http://oncecoupled.com | |
*/ | |
// Remove the loop and replace it with our own | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'LGD_add_archive', 9 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Don't paste this opening line! | |
function remove_more_link_scroll( $link ) { | |
$link = preg_replace( '|#more-[0-9]+|', '', $link ); | |
return $link; | |
} | |
add_filter( 'the_content_more_link', 'remove_more_link_scroll' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(function() { | |
var jumpID = $( '.mpprecipe-container-border' ).attr( 'id' ); | |
var printID = $( '.butn-link.mpp-button' ).attr( 'onclick' ); | |
var printIDEscaped = htmlEscape(printID); | |
if( jumpID ) { | |
if( printID ) { // if jump AND print | |
$( '.content .entry-header' ).append( '<div class="recipe-buttons"><a class="added-button jump" href="#' + jumpID + '">Jump to Recipe <i class="fa fa-book" aria-hidden="true"></i></a><a class="added-button print" title="Print this recipe" onclick="' + printIDEscaped + '">Print Recipe <i class="fa fa-print" aria-hidden="true"></i></a></div>' ); | |
} else { // if JUST jump |
OlderNewer