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_action( 'pre_get_posts', 'rgc_custom_order', 9999 ); | |
function rgc_custom_order( $query ) { | |
if ( $query->is_main_query() && is_post_type_archive( 'your-cpt' ) && !is_admin() ) { | |
$query->set( 'meta_key', 'custom_field' ); | |
$query->set( 'meta_value', date( 'm/d/Y' ) ); | |
$query->set( 'meta_compare', '>=' ); | |
$query->set( 'orderby', 'meta_value' ); | |
$query->set( 'order', 'DESC' ); |
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
/* | |
* derived from Sridhar Katakam's init at https://gist.github.com/srikat/9406477#file-isotope_init-js | |
* tutorial at http://sridharkatakam.com/filterable-portfolio-centric-pro/ | |
*/ | |
//Isotope | |
jQuery(function($){ | |
$(window).load(function() { | |
$.Isotope.prototype._masonryResizeChanged = function() { | |
return 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 | |
/** | |
* Portfolio Archive | |
*/ | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
add_filter( 'post_class', 'be_portfolio_post_class' ); | |
function be_portfolio_post_class( $classes ) { | |
if ( is_main_query() ) { // conditional added so that column classes don't apply to widget |
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 | |
/* | |
* This function is part of Simple Staff for Genesis. Extracted for educational purposes. Could be used also | |
* in a theme's functions.php file, if you're not working with a plugin. Do not include the opening tag. | |
*/ | |
add_action( 'pre_get_posts', 'simple_staff_order', 9999 ); | |
function simple_staff_order( $query ) { | |
if ( $query->is_main_query() && ( is_post_type_archive( 'staff' ) || is_tax( 'department' ) ) ) { |
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 this to your functions file, but do not include the lines above this! | |
add_action( 'template_redirect', 'remove_nav_exclude_blog_page' ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @learn more http://wpsites.net/web-design/conditionally-remove-your-primary-secondary-nav-menu/ | |
*/ | |
function remove_nav_exclude_blog_page() { |
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 | |
/** | |
* Front Page template for Robin Works theme. Optionally adds widget areas to be used in addition | |
* to a static home page. | |
* | |
* | |
* @author Robin Cornett | |
* @license GPL-2.0+ | |
* @link http://robincornett.com/ |
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 the following to your child theme functions.php file. Do not include the opening tag! | |
//* Change footer text | |
add_filter( 'genesis_footer_creds_text', 'robin_works_footer_creds_filter' ); | |
function robin_works_footer_creds_filter( $creds ) { | |
$creds = '[footer_copyright] <a href="' . home_url() . '">' . get_bloginfo( 'name' ) . '</a> | Design by <a href="http://robincornett.com">Robin Cornett</a>'; | |
return $creds; | |
} |
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 | |
// you can add this to your theme's functions.php file. do not include the opening tag. | |
add_filter( 'the_excerpt_rss', 'rgc_add_featured_image_to_feed_excerpt', 1000, 1 ); | |
function rgc_add_featured_image_to_feed_excerpt( $content ) { | |
if ( has_post_thumbnail( get_the_ID() ) ) { | |
$content = get_the_post_thumbnail( get_the_ID(), 'thumbnail', array( 'align' => 'left', 'style' => 'margin-right:20px;' ) ) . $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 | |
//* Apple Touch Icon | |
add_filter( 'wp_head', 'rgc_apple_touch_icon' ); | |
function rgc_apple_touch_icon() { | |
echo '<link rel="apple-touch-icon" href="' . get_stylesheet_directory_uri() . '/images/apple-touch-icon.png">'; | |
} |
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 | |
/** | |
* Archive page for products (custom post type). | |
* | |
*/ | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); |
OlderNewer