Skip to content

Instantly share code, notes, and snippets.

View SmartWizardSolutions's full-sized avatar

Chris F. SmartWizardSolutions

View GitHub Profile
@SmartWizardSolutions
SmartWizardSolutions / readmore.php
Created December 17, 2014 22:29
Display different content limit "Read More" links on WooCommerce archives than on other archives on the Genesis framework
add_filter( 'get_the_content_more_link', 'sp_read_more_link2' );
function sp_read_more_link2() {
if (is_woocommerce()) {
return '... <a class="more-link" href="' . get_permalink() . '">Customize ►</a>';
} else {
return '... <a class="more-link" href="' . get_permalink() . '">Read More ►</a>';
}
}
@SmartWizardSolutions
SmartWizardSolutions / functions.php
Created January 17, 2014 03:52
Style date in Genesis post info. This fixes a problem with post dates showing up as Jan 1st on all new posts from code previously found. CSS styles will need to be adjusted.
<?php
add_filter( 'genesis_post_date_shortcode', 'child_post_date_shortcode', 10, 2 );
/**
* Customize Post Date format and add extra markup for CSS targeting.
*/
function child_post_date_shortcode( $output, $atts ) {
return sprintf(
'<span class="date time published" title="%4$s">%1$s<span class="day">%2$s</span> <span class="date">%3$s</span> <span class="month">%4$s</span></span>',
@SmartWizardSolutions
SmartWizardSolutions / functions.php
Created January 17, 2014 03:40
Move Genesis Page Title Above Content/Sidebar Using New HTML5 hooks.
<?php
//Moves titles above content and sidebar
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_after_header', 'genesis_do_post_title', 20 );
//this removes post titles from blog archive pages as well
//Add titles back to home page, single posts, categeory archives and one specific page
add_action('get_header', 'move_other_post_titles');
function move_other_post_titles() {