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 | |
// Remove the date and time on comments in Genesis child themes | |
add_filter( 'genesis_show_comment_date', '__return_false' ); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* Display alphabetical list of tags. | |
* Template Name: Tag Index | |
* @author Joanne Waltham | |
*/ | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'jmw_do_tag_index_loop' ); |
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_while', 'custom_add_title_before_loop' ); | |
/* | |
* Echo out the title | |
* The genesis_before_while runs after the if( have_posts() ) | |
* and before while( have_posts() ) : the_post(); | |
*/ | |
function custom_add_title_before_loop() { |
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 | |
function nm2_people_page() { | |
// Get all user IDs | |
$args = array( | |
'fields' => 'ID', | |
); | |
$pids = get_users( $args ); |
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_filter( "genesis_structural_wrap-footer-widgets", 'jmw_filter_footer_widgets_structural_wrap', 10, 2); | |
/** | |
* Filter the footer-widgets context of the genesis_structural_wrap to add a div before the closing wrap div. | |
* | |
* @param string $output The markup to be returned | |
* @param string $original_output Set to either 'open' or 'close' | |
*/ |
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 | |
// If sub categories don't show products only show sub categories. | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'jmw_sub_categories_loop' ); | |
function jmw_sub_categories_loop() { | |
// Are there sub categories? | |
$term_object = get_queried_object(); | |
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 above | |
add_action( 'genesis_entry_content', 'jmw_add_envira_gallery_after_content', 15 ); | |
/* | |
* Add the gallery after the end of the content | |
*/ | |
function jmw_add_envira_gallery_after_content() { | |
$gallery = get_post_meta( get_the_ID(), 'gallery' ); // 'gallery' is name of my ACF gallery field |
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
.archive .one-third .entry-title, | |
.archive .one-fourth .entry-title, | |
.archive .one-sixth .entry-title, | |
.search .one-third .entry-title, | |
.search .one-fourth .entry-title, | |
.search .one-sixth .entry-title { | |
font-size: 18px; | |
text-align: center; | |
} |
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 above | |
/** | |
* Helper function to determine if we're on a blog section of a Genesis site. | |
* | |
* @since 2.0.0 | |
* | |
* @param $archives_only set to false to return true on singular posts | |
* @return bool True if we're on any section of the blog. |