Support » Plugin: Easing Slider » disable slider in seach-results or certain categories?

  • Resolved digitalPurist

    (@digitalpurist)


    hi matthew,

    I like your plugin a lot and I’m using the PRO version with multiple slideshows.

    In some situations it’s useful to disable your slider i.e. special search-results or maybe for posts in a specific category like ‘mobile’.

    I could use the_excerpt but it disables everything (style, pictures…).
    I’d rather use two different loops:
    – loopSlider.php (shows content including your slider)
    – loopNoSlider.php (displays everything in the post but NOT the slider)

    Is there a PHP-snippet that does the trick?

    Thanks

    http://wordpress.org/extend/plugins/easing-slider/

Viewing 10 replies - 1 through 10 (of 10 total)
  • OK, here is my workaround:
    I simply disabled the slider via CSS.

    A loop with a wrapper for posts without the slider:

    <div class="hideSlider">
        <?php while ( have_posts() ) : the_post(); ?>
            ...
            <?php the_content(); ?>
            ...
        <?php endwhile; // end of the loop. ?>
    </div>

    And the CSS:
    for lite-version:

    div.hideSlider .easingsliderlite {
        display: none;
    }

    for pro-version:

    div.hideSlider .easingsliderpro {
        display: none;
    }

    Plugin Author MatthewRuddy

    (@matthewruddy)

    Hi @digitalpurist, glad you’ve managed to figure this one out 🙂 You could also try using some WordPress conditionals, such as is_search to completely prevent the slideshow from loading, rather than just simply hiding it.

    Hi Matthew,
    yes, hiding the slideshow via css is just a workaround.
    I don’t know how to prevent your slideshow from loading.
    the_content() shows the whole article – including your slideshow.
    Is there a PHP-code or a parameter for the_content() that prevent the loading of a particular plugin? I don’t know and don’t think so …

    Plugin Author MatthewRuddy

    (@matthewruddy)

    HI @digitalpurist, I’m not quite sure what you mean. Is this related to disabling the slideshow on search result pages? Did you try putting the slideshow’s code inside the conditional mentioned in my last post? Like this:

    <?php
    if ( is_search() ) {
         if ( function_exists('easingsliderlite') ) {
               easingsliderlite();
         }
    }
    ?>

    Hi Matthew, in the pro-version it’s not working because an argument is needed. i.e.

    <?php
    if ( is_search() ) {
         if ( function_exists('easingsliderpro') ) {
               easingsliderpro(1);
         }
    }
    ?>

    this is enabling a certain slider (no. 1).
    what argument would disable all slider within that loop?
    can I “unload” the function???

    sorry for bothering …

    Plugin Author MatthewRuddy

    (@matthewruddy)

    My apologies, misread that you were using Easing Slider “Pro”.

    I’m not sure I’m completely understanding. Why would you load the code not to display the slideshow? If you want to disable nothing, don’t use the code.

    If you only want to hide the slideshow on the search page, the code below should work. Does it?

    Hi Matthew,

    Since I am not quite happy with my solution yet, I will try to explain my problem in more detail:

    I am using your slideshow within wordpress articles. In pseudo-code, such an article looks like:

    My article
    Some text here and a first slideshow
    [easingsliderpro id="1"]
    Some more text and a second slideshow
    [easingsliderpro id="2"]

    Now I would like to display the same article in two different ways within a web page. Normal viewing and within as search result.

    If I am in a search, I would now like the slide shows not to be loaded and not to be displayed when displaying the article.

    In my loop.php or content.php code I don’t have to use easingsliderpro(); to enable it. The slider is always active.

    And yes I could use the_excerpt but that would disable my pictures too.

    The CSS-workaround works but is there another option in your software that I could use in this situation?

    Plugin Author MatthewRuddy

    (@matthewruddy)

    Ok. I understand what you’re trying to achieve. Can you let me know what code you’ve added to your theme to display Easing Slider?

    Plugin Author MatthewRuddy

    (@matthewruddy)

    Hey again, do you still need help with this? 🙂

    Plugin Author MatthewRuddy

    (@matthewruddy)

    Going to mark this as resolved, but feel free to get back to me if help is still needed 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘disable slider in seach-results or certain categories?’ is closed to new replies.