Skip to content

Commit

Permalink
support to "YITH Slider for page builders" plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
francgrasso committed Apr 30, 2020
1 parent 380f1b5 commit 6040da0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ class="site-header <?php echo esc_attr( get_theme_mod( 'yith_proteo_header_layou
<?php endif; ?>

<?php
if ( defined( 'YITH_PROTEO_UTILS' ) ) {
if ( defined( 'YITH_SLIDER_FOR_PAGE_BUILDERS' ) ) {

if ( $post ) {
$slider = get_post_meta( $post->ID, 'header_slider', true );
if ( $slider && '' != $slider ) {
echo do_shortcode( '[yith-proteo-slider slider="' . get_post_meta( $post->ID, 'header_slider', true ) . '"]' );
echo do_shortcode( '[yith-slider slider="' . get_post_meta( $post->ID, 'header_slider', true ) . '"]' );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions inc/metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function yith_proteo_header_slider_add_meta_box() {
}


if ( defined( 'YITH_PROTEO_UTILS' ) ) {
if ( defined( 'YITH_SLIDER_FOR_PAGE_BUILDERS' ) ) {
add_action( 'add_meta_boxes', 'yith_proteo_header_slider_add_meta_box' );
}

Expand Down Expand Up @@ -227,7 +227,7 @@ function yith_proteo_header_slider_html( $post ) {
<?php
$args = array(
'posts_per_page' => - 1,
'post_type' => 'yith_proteo_slider',
'post_type' => 'yith_slider',
'post_status' => 'publish',
'fields' => 'ids',
);
Expand Down
1 change: 0 additions & 1 deletion sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*
* @package yith-proteo
*/

if ( ! is_active_sidebar( 'sidebar-1' ) || ! yith_proteo_get_sidebar_position( 'sidebar-show' ) ) {
return;
}
Expand Down

0 comments on commit 6040da0

Please sign in to comment.