Search Page Oddity

Hey Guys,

I’m Working on a new website and currently something a little odd is happening that i need to get resolved. When I search on the site it will pick the correct header… however it will load a random Revolution Slider below masthead option. Really strange but is there a way to remove this slider on the search page within the functions.php?

Page for you to see.
https://crosspointnv18.elitewebscapes.com/?s=give

Hello @EliteWebscapes,

Thanks for posting in!

I can confirmed that this is a bug in the latest release. I’ve submitted this to our issue tracker so the developers will be made aware of it.

Meanwhile, to resolve your issue, please do the following since you already have a child theme installed.

1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/GLOBAL/_SLIDER-BELOW.PHP
// -----------------------------------------------------------------------------
// Slider output below the header.
// =============================================================================

if ( X_REVOLUTION_SLIDER_IS_ACTIVE || X_LAYERSLIDER_IS_ACTIVE && is_page() ) :

  $id            = x_get_the_ID();
  $slider_active = get_post_meta( $id, '_x_slider_below', true );
  $slider        = ( $slider_active == '' ) ? 'Deactivated' : $slider_active;

  if ( $slider != 'Deactivated' ) :

    $bg_video           = get_post_meta( $id, '_x_slider_below_bg_video', true );
    $bg_video_poster    = get_post_meta( $id, '_x_slider_below_bg_video_poster', true );
    $anchor             = get_post_meta( $id, '_x_slider_below_scroll_bottom_anchor_enable', true );
    $anchor_alignment   = get_post_meta( $id, '_x_slider_below_scroll_bottom_anchor_alignment', true );
    $anchor_color       = get_post_meta( $id, '_x_slider_below_scroll_bottom_anchor_color', true );
    $anchor_color_hover = get_post_meta( $id, '_x_slider_below_scroll_bottom_anchor_color_hover', true );

    ?>

    <div class="x-slider-container below<?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.below       { color: <?php echo $anchor_color; ?>;       }
          .x-slider-scroll-bottom.below:hover { color: <?php echo $anchor_color_hover; ?>; }
        </style>

        <a href="#" class="x-slider-scroll-bottom below <?php echo $anchor_alignment; ?>">
          <i class="x-icon-angle-down" data-x-icon-s="&#xf107;" aria-hidden="true"></i>
        </a>

      <?php endif; ?>

      <?php echo do_shortcode( x_get_slider_shortcode( $slider ) ); ?>

    </div>

  <?php endif;

endif;

3] Save the file named as _slider-below.php
4] Upload this file to your server in the child theme’s folder wp-contents/themes/pro-child/framework/views/global/

You will need to create the folder path since it does not exist yet in your child theme.

Please let us know how it goes.

I put this into the site… however no difference. :expressionless:

Also we had adjusted this…
wp-contents/themes/pro-child/framework/views/global/

to
wp-content

Would this be the issue or was there a type and it still doesnt work?

Hey @EliteWebscapes ,

​To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Meanwhile, please make sure that you have cleared all your site caches before testing the site again.

Thank you.

So this is interesting. So it looks like if i Search “Give”, the page loads the revo slider no matter what? Are you seeing the same?

Hello @EliteWebscapes,

I have logged in and resolved the issue already.
There was a misconfiguration of the conditional expression in the code.

Please check your search page results now.

You rock!! Thanks so much!

If you’d like to check out my other ticket dealing with some of the search oddities in pro take a gander at this one

Hi There,

I’ve already replied to that ticket :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.