Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #395691

    Tristan A
    Participant

    Ok, I didn’t have that “That’s all” line, but I put it somewhere else near the bottom.

    This is the output I get….

    Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use
    __construct()
    instead. in /nas/wp/www/cluster-40709/confidenthabit/wp-includes/functions.php on line 3457

    Fatal error: Call to undefined function is_frontpage() in /nas/wp/www/cluster-40709/confidenthabit/wp-content/themes/x-child/framework/views/global/_slider-above.php on line 52

    #395709

    Rue Nel
    Moderator

    Hello There,

    Based on the fatal error, there was a typographic error. In your code, please change is_frontpage() to is_front_page(). Perhaps the content of the _slider-above.php file is this:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_SLIDER-ABOVE.PHP
    // -----------------------------------------------------------------------------
    // Slider output above all page content.
    // =============================================================================
    
    if ( X_REVOLUTION_SLIDER_IS_ACTIVE ) :
    
      GLOBAL $post;
    
      if ( is_home() ) {
        $id = get_option( 'page_for_posts' );
      } elseif ( x_is_shop() ) {
        $id = woocommerce_get_page_id( 'shop' );
      } else {
        $id = $post->ID;
      }
      
      $slider_active = get_post_meta( $id, '_x_slider_above', true );
      $slider        = ( $slider_active == '' ) ? 'Deactivated' : $slider_active;
    
      if ( $slider != 'Deactivated' ) :
    
        $bg_video           = get_post_meta( $id, '_x_slider_above_bg_video', true );
        $bg_video_poster    = get_post_meta( $id, '_x_slider_above_bg_video_poster', true );
        $anchor             = get_post_meta( $id, '_x_slider_above_scroll_bottom_anchor_enable', true );
        $anchor_alignment   = get_post_meta( $id, '_x_slider_above_scroll_bottom_anchor_alignment', true );
        $anchor_color       = get_post_meta( $id, '_x_slider_above_scroll_bottom_anchor_color', true );
        $anchor_color_hover = get_post_meta( $id, '_x_slider_above_scroll_bottom_anchor_color_hover', true );
    
        ?>
    
        <div class="x-slider-container above<?php if ( $bg_video != '' ) { echo ' bg-video'; } ?>">
    
          <?php if ( $bg_video != '' ) : echo function_exists( 'cs_bg_video' ) ? cs_bg_video( $bg_video, $bg_video_poster ) : ''; endif; ?>
    
          <?php if ( $anchor == 'on' ) : ?>
    
            <style scoped>
              .x-slider-scroll-bottom.above       { color: <?php echo $anchor_color; ?>;       }
              .x-slider-scroll-bottom.above:hover { color: <?php echo $anchor_color_hover; ?>; }
            </style>
    
            <a href="#" class="x-slider-scroll-bottom above <?php echo $anchor_alignment; ?>">
              <i class="x-icon-angle-down" data-x-icon=""></i>
            </a>
    
          <?php endif; ?>
    
          <?php if ( is_front_page() ) : ?>
    
          <?php // The default home slider ?>
          <div class="default-slider x-hide-xs">
          <?php putRevSlider( $slider ); ?>
          </div>
    
          <?php // The mobile slider ?>
          <div class="mobile-slider x-hide-lg x-hide-md x-hide-sm">
          <?php putRevSlider( 'homephone' ); ?>
          </div>
    
          <?php else : ?>
    
          <?php // The slider ?>
          <?php putRevSlider( $slider ); ?>
    
          <?php endif; ?>
    
        </div>
    
      <?php endif;
    
    endif;

    Please let us know if this works out for you.

    #395723

    Tristan A
    Participant

    Ok, thanks! The slider now shows. And indeed it does show a different slider now on mobile screens!

    However, there is now another issue, as the slider background image is now blown up to huge proportions?? It is a high resolution image, but you can now see each individual pixel, see this screenprint?

    https://www.dropbox.com/s/5wnxuqbjvd9gwe9/Schermafdruk%202015-09-19%2011.50.27.png?dl=0

    #395728

    Tristan A
    Participant

    Mmmmm… weird, in Microsoft Edge it seems to work fine… until you scroll down and then you can see that it shows BOTH sliders on top of each other….

    It also says still
    Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct()
    instead. in /nas/wp/www/cluster-40709/confidenthabit/wp-includes/functions.php on line 3457

    #395729

    Tristan A
    Participant
    This reply has been marked as private.
    #395762

    Tristan A
    Participant

    Please note, the above is SFTP, not FTP

    #395864

    Christopher
    Moderator

    Hi there,

    I’m not able to connect to SFTP account, please check it.
    The noticed is not related to provided code, please remove other functions except this one and let us know if the notice is still there.

    Also I see great values for min-height and width properties in your site which made the image looks really huge, check the attachment.

    Hope it helps.

    #395871

    Tristan A
    Participant
    This reply has been marked as private.
    #395933

    Tristan A
    Participant

    Ok, I see, different attachment.

    But where should these min-height and width values be changed?? The screenshot suggests that it is in revolution slider, but I don’t see it there?

    #396017

    Tristan A
    Participant

    Ok, this is really weird…..

    I took out the WP debug line from wp-config.php and all of a sudden the sliders work again??? They are no longer ridiculously large sized?!!!

    There still is the problem that the regular slider for large screens and the slider for mobile screens are placed on top of each other. So I think there is still an issue with the Php code.

    Will supply screenshot in a private message below

    #396018

    Tristan A
    Participant
    This reply has been marked as private.
    #396074

    Rad
    Moderator

    Hi there,

    Please add this css at Admin > Appearance > Customizer > Custom > CSS

    @media (min-width: 980px) {
    .mobile-slider {
    display: none !important;
    }
    }

    Please clear your cache before testing.

    Hope this helps.

    #396325

    Tristan A
    Participant

    Ok guys, thanks so much for your patience and excellent support!

    This thing is starting to freak me out though…. I implemented the above code and it worked. However, I noticed something weird then. Somehow, it seems that the revolution slider visibility settings then started doing EXACTLY what they are supposed to do.

    So here is what I have done now:
    1. Removed above CSS again
    2. Deleted _slider-above.php
    3. Made a text layer “large screens” to be shown on large screens, a “tablet” layer to be shown on tablets and “phones” etc. with revolution slider visibility settings set accordingly off course.

    This is very confusing but I will show screenshots in a private reply that shows this works now??? Without additional php coding and css??

    Again thanks for your patience and incredible support.

    #396326

    Tristan A
    Participant
    This reply has been marked as private.
    #396802

    Lely
    Moderator

    Hello Tristan,

    Glad that this is working now.

    Cheers!
    X