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
.entry a:link, .entry a:visited { | |
font-family: Georgia, serif; | |
color: #0066cc; | |
font-weight: bold; | |
font-size: 1.1em; | |
} |
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
if ( ! function_exists( 'woo_shortcode_post_format' ) ) { | |
function woo_shortcode_post_format () { | |
$format = get_post_format( $post->ID ); | |
$output = sprintf('<span class="categories">%s</span> ', $format ); | |
return apply_filters( 'woo_shortcode_post_format', $output, $atts ); | |
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 product categories to the "Product" breadcrumb in WooCommerce. | |
// Get breadcrumbs on product pages that read: Home > Shop > Product category > Product Name | |
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_add_product_categories', 20 ); | |
function woo_custom_breadcrumbs_trail_add_product_categories ( $trail ) { | |
if ( ( get_post_type() == 'product' ) && is_singular() ) { | |
global $post; | |
$taxonomy = 'product_cat'; |
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
@media only screen and (min-width: 1024px) { | |
.page #header, .single-post #header, .single-product #header { | |
position: fixed; | |
left: 0; | |
top: 0; | |
width: 25%; | |
max-width: 500px; | |
height: 100%; | |
-webkit-transition: all ease-in-out 0.2s; | |
-moz-transition: all ease-in-out 0.2s; |
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
/* Change timeline post background colours to #f0f0f0 and #eeeeee on hover */ | |
#posts-timeline .timeline-post {background: #f0f0f0;} | |
#posts-timeline .timeline-post:nth-child(1n):before {border-color: #f0f0f0 transparent transparent transparent;} | |
#posts-timeline .timeline-post:hover {background: #eeeeee;} | |
#posts-timeline .timeline-post:nth-child(1n):hover:before {border-color: #eeeeee transparent transparent transparent;} | |
@media only screen and (min-width: 768px) { | |
#posts-timeline .timeline-post:nth-child(2n):before {border-color: transparent transparent #f0f0f0 transparent;} | |
#posts-timeline .timeline-post:nth-child(2n):hover:before {border-color: transparent transparent #eeeeee transparent;} | |
} |
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( 'woo_post_inside_after', 'woo_customise_testimonials_archive' ); | |
if ( ! function_exists( 'woo_customise_testimonials_archive' ) ) { | |
function woo_customise_testimonials_archive() { | |
if ( 'testimonial' == get_post_type() ) { | |
$author = get_the_title(); | |
$info = get_post_custom(); | |
echo '<cite class="author">' . $author . '<span class="excerpt">' . $info[_byline][0] . '</span><!--/.excerpt-->'; | |
echo '<span class="url"><a href="' . $info[_url][0] . '">' . $info[_url][0] . '</a></span>'; | |
} |
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('gettext', 'translate_text'); | |
add_filter('ngettext', 'translate_text'); | |
function translate_text($translated) { | |
$translated = str_ireplace('New Courses', 'Available Courses', $translated); | |
return $translated; | |
} |
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 | |
add_action( 'admin_head', 'woo_custom_options', 50 ); | |
function woo_custom_options(){ | |
$limit = array(); | |
//set the limit to 40 | |
for ( $i = 1; $i <= 40; $i++ ) { | |
$limit[$i] = $i; | |
} | |
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 module_archive_limit( $query ) { | |
if( is_tax( Sensei()->modules->taxonomy ) && $query->is_main_query() ) { | |
// Set number of lessons per page | |
$query->set( 'posts_per_page', 20 ); | |
} | |
} | |
add_action( 'pre_get_posts', 'module_archive_limit', 15, 1 ); |
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( 'sensei_new_courses_text', 'sensei_custom_new_courses_text', 10 ); | |
function sensei_custom_new_courses_text () { | |
$text = "Recent Courses"; | |
return $text; | |
} |
OlderNewer