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
<script type="text/javascript"> | |
(function($) { | |
$(function() { | |
var jumpID = $( '.easyrecipe' ).attr( 'id' ); | |
if( jumpID ) { | |
$( 'body' ).addClass( 'skipLink' ); | |
$( '.content .entry-header' ).append( '<a href="#' + jumpID + '" class="skip">Skip to Recipe</a>' ); | |
} | |
}); | |
})(jQuery); |
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
<script type="text/javascript"> | |
(function($) { | |
$(function() { | |
var jumpID = $( '.mpprecipe-container-border' ).attr( 'id' ); | |
if( jumpID ) { | |
$( 'body' ).addClass( 'skipLink' ); | |
$( '.content .entry-header' ).append( '<a href="#' + jumpID + '" class="skip">Skip to Recipe</a>' ); | |
} | |
}); | |
})(jQuery); |
OlderNewer