This file contains hidden or 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
/** | |
* Template Redirect | |
* Use page_beaver.php for all static Pages. | |
*/ | |
add_filter( 'template_include', 'custom_page_template', 99 ); | |
function custom_page_template( $template ) { | |
if ( is_singular( 'page' ) ) { | |
$new_template = locate_template( array( 'page_beaver.php' ) ); | |
if ( '' != $new_template ) { |
This file contains hidden or 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 | |
function mrp_posts_fields( $posts_fields ) { | |
if ( is_main_query() ) { | |
$sticky_posts = get_option( 'sticky_posts' ); | |
if ( is_array( $sticky_posts ) && ! empty( $sticky_posts ) ) { | |
$sticky_posts = implode( ', ', $sticky_posts ); |
This file contains hidden or 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 hidden or 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 | |
/** moves non-breaking spaces to right of fselect label **/ | |
add_filter( 'facetwp_facet_html', function( $output, $params ) { | |
if ( 'my_facet_name' == $params['facet']['name'] ) { // replace 'my_facet_name' with name of your facet | |
$pattern = '/>([ ]+)([^<]+)/'; | |
$output = preg_replace( $pattern, '>${2} ${1}', $output ); | |
} | |
return $output; | |
}, 10, 2 ); |
OlderNewer