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 | |
//* Do NOT include the opening php tag | |
//* https://sridharkatakam.com/slide-search-box-full-screen-overlay-genesis/ | |
//* Make Font Awesome available | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' ); | |
} |
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
add_action( 'pre_get_posts', 'sk_order_posts_by_modified' ); | |
/** | |
* Arrange Posts by last modified with the most recently updated ones at the top | |
* | |
* @author Sridhar Katakam | |
* @author Bill Erickson <- Boss | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data | |
* | |
*/ |
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
jQuery(function( $ ){ | |
$(".site-header").backstretch([BackStretchImg.src],{duration:3000,fade:750}); | |
}); |
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
add_image_size( 'home-image', 400, 400, 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 | |
* Author: Sridhar Katakam | |
* | |
*/ | |
//* Add portfolio body class to the head | |
add_filter( 'body_class', 'sk_add_portfolio_body_class' ); | |
function sk_add_portfolio_body_class( $classes ) { |
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 | |
//* Do NOT include the opening php tag | |
add_action( 'genesis_before', 'sk_replace_menu_in_primary' ); | |
/** | |
* Conditionally replace Custom Menu in Primary Navigation. | |
* | |
* @author Sridhar Katakam | |
* @link http://sridharkatakam.com/conditionally-replace-navigation-menu-genesis/ | |
*/ |
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
//* Enqueue scripts and styles | |
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts_styles' ); | |
function custom_enqueue_scripts_styles() { | |
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' ); | |
wp_enqueue_script( 'global', get_bloginfo( 'stylesheet_directory' ) . '/js/global.js', array( 'jquery' ), '1.0.0', 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 | |
//* Do NOT include the opening php tag | |
// ================================================================= | |
// = Pinterest-like Masonry layout for Posts page and Archives = | |
// ================================================================= | |
//* Enqueue and initialize jQuery Masonry script | |
function sk_masonry_script() { | |
if (is_home() || is_archive()) { |
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 | |
//* Do NOT include the opening php tag | |
add_action( 'pre_get_posts', 'sk_change_blog_home_posts_per_page' ); | |
/** | |
* Change Posts Per Page for Blog Home | |
* | |
* @author Bill Erickson (original), changed by Sridhar Katakam | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data |
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
//* Register a custom image size for Featured images above entries on list pages | |
add_image_size( 'archive-featured-image', 800, 300, true ); | |
add_action( 'genesis_before_entry', 'sk_featured_image_above_posts' ); | |
/** | |
* Display Featured Image above Post Titles regardless of Content Archives settings | |
* | |
* Context: Posts page, all archives and search results pages. | |
* | |
* @author Sridhar Katakam |
OlderNewer