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 | |
// Limit tag cloud widget to 20 items and order by count | |
add_filter('widget_tag_cloud_args','set_number_tags'); | |
function set_number_tags($args) { | |
$args = array('number' => 20, 'orderby' => 'count'); | |
return $args; | |
} |
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 | |
// Customize font-size of tag cloud widget | |
add_filter('widget_tag_cloud_args','set_number_tags'); | |
function set_number_tags($args) { | |
$args = array('smallest' => 11, 'largest' => 11); | |
return $args; | |
} |
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 | |
/* | |
* Add a shortcode for search form in WordPress | |
* @url http://www.paulund.co.uk/display-wordpress-search-form | |
*/ | |
function search_form_shortcode( ) { | |
get_search_form( ); | |
} |
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 | |
/** | |
* Template Name: Testimonial Archives | |
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive | |
*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop |
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
// Remove comments from posts | |
remove_action( 'genesis_after_post', 'genesis_get_comments_template' ); | |
// Add comments back in if conditions are met | |
add_action( 'genesis_after_post', 'cd_conditional_comments' ); | |
function cd_conditional_comments() { | |
// Conditional Reference http://codex.wordpress.org/Function_Reference/get_the_author | |
if ('Author Display Name' == get_the_author() ) { | |
genesis_get_comments_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 | |
/** | |
* Archive Post Class | |
* @since 1.0.0 | |
* | |
* Breaks the posts into three columns | |
* @link http://www.billerickson.net/code/grid-loop-using-post-class | |
* | |
* @param array $classes |
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 | |
// Move image above post title in Genesis Framework | |
remove_action( 'genesis_post_content', 'genesis_do_post_image' ); | |
add_action( 'genesis_before_post_title', 'genesis_do_post_image' ); |
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 | |
/* Template Name: Test */ | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed |
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 | |
// Cuatomize the failed login error message | |
function failed_login() { | |
return 'Incorrect login information.'; | |
} | |
add_filter('login_errors', 'failed_login'); |