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
function marce_allow_pages_for_relatedposts( $enabled ) | |
{ | |
if ( is_page() ) { | |
$enabled = true; | |
} | |
return $enabled; | |
} | |
add_filter( 'jetpack_relatedposts_filter_enabled_for_request', 'marce_allow_pages_for_relatedposts' ); |
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
// If you haven't already, make sure you add theme support for Jetpack Testimonials | |
add_theme_support( 'jetpack-testimonial' ); | |
//Now we will set the panel for the Testimonials to our custom panel | |
function marce_customize_register( $wp_customize ) { | |
$wp_customize->get_section( 'jetpack_testimonials' )->panel = 'my_panel'; | |
} |
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
// Add Theme support and write a function to get the featured posts | |
// This goes in your themes functions.php file | |
add_theme_support( 'featured-content', array( | |
'filter' => 'mytheme_get_featured_posts', | |
'max_posts' => 20, | |
'post_types' => array( 'post', 'page' ), | |
) ); | |
function mytheme_get_featured_posts() { |
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( 'wooslider_modify_carousel_nav_javascript', 'custom_filter_func' ); | |
function custom_filter_func( $options ){ | |
$options['itemWidth'] = '100'; | |
$options['minItems'] = '4'; | |
$options['maxItems'] = '4'; | |
return $options; | |
} |
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 | |
function woo_sensei_pagination() { | |
global $wp_query, $woothemes_sensei; | |
$paged = $wp_query->get( 'paged' ); | |
$course_page_id = intval( $woothemes_sensei->settings->settings[ 'course_page' ] ); | |
if ( ( is_post_type_archive( 'course' ) || ( is_page( $course_page_id ) ) ) && ( isset( $paged ) && 0 == $paged ) ) { | |
// Silence | |
} elseif( is_singular( 'course' ) ) { |
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 | |
// Hook In | |
add_action( 'woo_top', 'woo_hello' ); | |
// Our hooked in Function | |
function woo_hello() { | |
echo "Hello World"; | |
} |
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 | |
function custom_wc_admin_variations_per_page( $qty ) { | |
return 999; | |
} | |
add_filter( 'woocommerce_admin_meta_boxes_variations_per_page', 'custom_wc_admin_variations_per_page' ); |