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
add_filter( 'sensei_new_courses_text', 'sensei_custom_new_courses_text', 10 ); | |
function sensei_custom_new_courses_text () { | |
$text = "Recent Courses"; | |
return $text; | |
} |
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_course_slug', 'sensei_custom_course_slug', 10 ); | |
function sensei_custom_course_slug () { | |
$slug = "workshop"; | |
return $slug; | |
} |
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
/** | |
* Remove checkout field | |
* | |
* @filter woocommerce_checkout_fields | |
* @since 1.0.0 | |
* | |
*/ | |
function apk_override_checkout_fields( $fields ) { |
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
function change_course_taxonomy_order( $query ) { | |
// Are we querying a course-category archive? | |
if ( is_tax( 'course-category' ) && $query->is_main_query() ) { | |
$query->set( 'posts_per_page', '6' ); | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'change_course_taxonomy_order' ); |
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( 'course_category_archive_title', 'custom_course_category_title', 10 ); | |
function custom_course_category_title( $title ) { | |
global $wp_query; | |
$taxonomy_obj = $wp_query->get_queried_object(); | |
$title = sprintf( __( 'Course Category: %s', 'woothemes-sensei' ), $taxonomy_obj->name ); | |
$title = '<header class="archive-header"><h1>' . $title . '</h1></header>'; | |
return $title; | |
} |
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( 'after_setup_theme', 'declare_sensei_support' ); | |
function declare_sensei_support() { | |
add_theme_support( 'sensei' ); | |
} |
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
function woo_display_top_section() { | |
global $woo_options, $post; | |
$title = ''; | |
if ( is_category() ) { | |
$title = __('Archive', 'woothemes') . ' | ' . single_cat_title( '', false ); | |
} elseif ( is_day() ) { | |
$title = __('Archive', 'woothemes') . ' | ' . get_the_time( get_option( 'date_format' ) ); |
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 Twenty Ten | |
case 'twentyten' : | |
echo '<div id="container"><div id="content" role="main">'; | |
break; |
OlderNewer