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 Custom Tab | |
| * Add this code to your theme or child theme functions.php file | |
| */ | |
| add_filter( 'learn-press/course-tabs', 'wp_education_course_tab_customize' ); | |
| function wp_education_course_tab_customize( $tabs ){ |
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 | |
| /** | |
| * Related Products by Sub categories only | |
| */ | |
| add_filter('wpb_wrps_related_products_args', 'wpb_wrps_filter_woocommerce_related_products_args'); | |
| function wpb_wrps_filter_woocommerce_related_products_args($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_filter( 'wpb_wmca_category_css_class', 'wpb_wmca_add_support_single_doc', 10, 4 ); | |
| function wpb_wmca_add_support_single_doc($css_classes, $category, $depth, $args){ | |
| if( is_singular( 'docs' ) ){ | |
| if ( ! empty( $args['current_category'] ) ) { | |
| if ( $args['current_category'] === $category->term_id ) { | |
| $css_classes[] = 'current-cat'; | |
| } |
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 the following code on your theme or child theme functions.php file - | |
| if( !function_exists('wpb_wrps_add_custom_related_products') ){ | |
| function wpb_wrps_add_custom_related_products( $args ) { | |
| global $product; |
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 Custom Tab | |
| */ | |
| add_filter( 'reptro_course_options', 'reptro_course_options_custom_fields' ); | |
| function reptro_course_options_custom_fields( $fields ){ | |
| $fields[] = array( |
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_action( 'wpb_wl_woocommerce_product_summary', 'wpb_wl_wc_quotation', 30 ); | |
| function wpb_wl_wc_quotation(){ | |
| global $product; | |
| ?> | |
| <div class="<?php echo $product->get_type() . "_add_to_quote button_add_to_quote" ?>"> | |
| <button class="single_adq_button button alt" id="add_to_quote" | |
| <?php echo $product->get_type() === 'variable' ? 'data-enable-button="' . get_option( 'adq_enable_button_outofstock', 'no' ) . '"' : '' ?> |
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_filter( 'wpb_fp_portfolio_post_type_labels', 'wpb_fp_portfolio_post_type_labels_update' ); | |
| function wpb_fp_portfolio_post_type_labels_update( $labels ){ | |
| $labels = array( | |
| 'name' => esc_html_x( 'WPB Portfolios', 'Post Type General Name', WPB_FP_TEXTDOMAIN ), | |
| 'singular_name' => esc_html_x( 'Portfolio', 'Post Type Singular Name', WPB_FP_TEXTDOMAIN ), | |
| 'menu_name' => esc_html__( 'WPB Portfolio', WPB_FP_TEXTDOMAIN ), | |
| 'parent_item_colon' => esc_html__( 'Parent Portfolio:', WPB_FP_TEXTDOMAIN ), |
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_filter( 'learn_press_single_course_image_html', 'learn_press_single_course_image_html_update', 10, 2 ); | |
| function learn_press_single_course_image_html_update( $image, $id ){ | |
| $image_title = get_the_title( get_post_thumbnail_id($id) ) ? esc_attr( get_the_title( get_post_thumbnail_id() ) ) : ''; | |
| $image_caption = get_post( get_post_thumbnail_id($id) ) ? esc_attr( get_post( get_post_thumbnail_id() )->post_excerpt ) : '""'; | |
| $image_link = get_the_permalink( $id ); | |
| $image = get_the_post_thumbnail( $id, apply_filters( 'single_course_image_size', 'single_course' ), array( | |
| 'title' => $image_title, |
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 this code on your theme functions.php file | |
| */ | |
| add_filter( 'wpb_wps_product_archive_thumbnail_size', 'wpb_wps_product_archive_thumbnail_size_update' ); | |
| function wpb_wps_product_archive_thumbnail_size_update( $size ){ | |
| $size = 'large'; // your image size |
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 | |
| /* | |
| * https://themeforest.net/item/reptro-online-course-wordpress-theme/21817850 | |
| */ | |
| remove_action( 'learn-press/after-checkout-form', 'learn_press_back_to_class_button' ); | |
| remove_action( 'learn-press/after-empty-cart-message', 'learn_press_back_to_class_button' ); | |
| add_action( 'learn-press/after-checkout-form', 'reptro_learn_press_back_to_class_button' ); | |
| add_action( 'learn-press/after-empty-cart-message', 'reptro_learn_press_back_to_class_button' ); |