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_filter( 'get_pages', function ( $pages, $r ) { | |
if ( function_exists( 'get_current_screen' ) && 'options-reading' === get_current_screen()->id ) { | |
$pages = array_merge( $pages, get_posts( ['post_type' => 'post'] ) ); | |
} | |
return $pages; | |
}, 10, 2 ); |
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
/** | |
* AJAX Load More | |
* @link http://www.billerickson.net/infinite-scroll-in-wordpress | |
*/ | |
function be_ajax_load_more() { | |
$args = isset( $_POST['query'] ) ? array_map( 'esc_attr', $_POST['query'] ) : array(); | |
$args['post_type'] = isset( $args['post_type'] ) ? esc_attr( $args['post_type'] ) : 'post'; | |
$args['paged'] = esc_attr( $_POST['page'] ); | |
$args['post_status'] = 'publish'; |
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 | |
//* Enqueue audio script | |
add_action( 'wp_enqueue_scripts', 'enqueue_audio_on_menu_items_click' ); | |
function enqueue_audio_on_menu_items_click() { | |
wp_enqueue_script( 'load-audio', get_stylesheet_directory_uri() . '/js/load-audio.js', array( 'jquery' ), '', 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
add_action( 'genesis_header', 'sk_remove_page_titles' ); | |
/** | |
* Remove Page Titles for specific Pages. | |
* | |
* @author Sridhar Katakam | |
* @link http://www.sridharkatakam.com/remove-page-titles-selectively-centric-pro/ | |
*/ | |
function sk_remove_page_titles() { | |
$pages = array( 1149, 1306, 6, 24 ); |
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 custom Header + About container's opening div tag | |
add_action( 'genesis_before_header', 'sk_home_opening_div' ); | |
function sk_home_opening_div() { | |
if (! is_front_page() ) | |
return; | |
echo '<div class="header-about-wrapper">'; | |
} |
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 ( 'genesis_before_header', 'sk_add_full_width_banner_image' ); | |
function sk_add_full_width_banner_image() { | |
echo '<div class="banner-image"><img src="http://genesis.dev/wp-content/uploads/2013/12/header.jpg" /></div>'; | |
} |
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 | |
/** | |
* Plugin Name | |
* | |
* @package Custom_Featured_Post_Widget | |
* @author Gary Jones | |
* @license GPL-2.0+ | |
* @link http://gamajo.com/ | |
* @copyright 2013 Gary Jones, Gamajo Tech | |
*/ |
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 Dashicons | |
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' ); | |
function enqueue_dashicons() { | |
wp_enqueue_style( 'dashicons' ); | |
} | |
//* Customize search form input button text | |
add_filter( 'genesis_search_button_text', 'sk_search_button_text' ); |
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
//* Position post info above post title | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12); | |
add_action( 'genesis_entry_header', 'genesis_post_info', 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
// Enqueue site-wide scripts | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_script( 'global', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ), '', true ); | |
} |
NewerOlder