Okay
  Public Ticket #145797
Revolution Slider Revisited
Closed

Comments

  • Steven started the conversation

    Awesome theme. I've found the directions to, and have enabled the Revolution Slider however, none of the other content seems to work. Should one want to use the Salient theme demo content/layout and simply replace the slider, how would one best accomplish that? I've run into the following issues/challenges: 

    1) The Salient default content uses the Default Template. This appears to be the page.php file. Is that correct? If not, which .php file does the theme call as the Default Template (i.e., template-home-1.php, template-home-2.php, etc)?

    2) If one wanted to simply use the Default Template with the Revolution Slider, assuming it's page.php, which lines specifically would need to be inserted into the page.php file? Would inserting the attached code snippet into a renamed copy of page.php suffice?

  •  982
    ThemeNectar replied

    Hey Steven!

    If you want to just place it on the home page, insert it into the template-home-4.php - which is thee Home - Slider Only layout.

    <?php putRevSlider('rufushome','homepage'); ?>

    Place it right under line 5 which is

    <?php $options = get_option('salient'); ?>

    now just enter this into your custom css box:

    #featured {
       display: none!important;
    } 

    Cheers :)

  • Steven replied

    Thanks for getting back to me, I appreciate it. Please forgive me, I'm still a little unclear. 

    Do I replace:

    <div id="featured" data-caption-animation="<?php echo (!empty($options['slider-caption-animation']) && $options['slider-caption-animation'] == 1) ? '1' : '0'; ?>" data-bg-color="<?php if(!empty($options['slider-bg-color'])) echo $options['slider-bg-color']; ?>" data-slider-height="<?php if(!empty($options['slider-height'])) echo $options['slider-height']; ?>" data-animation-speed="<?php if(!empty($options['slider-animation-speed'])) echo $options['slider-animation-speed']; ?>" data-advance-speed="<?php if(!empty($options['slider-advance-speed'])) echo $options['slider-advance-speed']; ?>" data-autoplay="<?php echo $options['slider-autoplay'];?>"> 

    with:

    <div id="featured" data-caption-animation="<?php putRevSlider("newSlider","homepage") ?>">

    or just insert this below line 5, as instructed? :

    <?php putRevSlider("newSlider","homepage") ?>

    Here is the test page I am working on: http://rufus.wpengine.com/default

    As I understand your reply, the "slider-only" page (template-home4.php) will allow the page content to remain, and simply replaces the slider only for any given page the template is applied to. Am I correct?

    When I use any of the alternative template-home templates (template-home4.php included), none of the page/post body content appears, which is why I ask.

  •  982
    ThemeNectar replied

    Hey again Steven!

    You're going to do the latter:

    or just insert this below line 5, as instructed? :

    <?php putRevSlider("newSlider","homepage") ?>

    and then after you've done that make sure you have this in your custom css box in the theme options panel:

    #featured { display: none!important; }

    That will get rid of the old Home Slider that would still remain by default.

    Cheers :)

  • [deleted] replied

    I believe I may have a solution which is relevant to this issue.

    I wanted to be able to use the Nectar Slider along with the Revolution Slider plugin (both brought into page via shortcode), however I found there was an error when I attempted to put both sliders on the same page.

    I tracked the issue down to some code in nectar-slider.js which was converting RGB strings to #hexcodes. This function, which globally overrode the CSS getter for background-color, did not account for RGBA values. This caused the code to be incompatible with Revolution Slider.

    I've created a fix for this issue, by way of regex wizardry... :)

    nectar-slider.js: line 3566    (OVERRIDE IN CHILD THEME UNLESS FIX IS APPLIED TO NEXT RELEASE OF THEME)

        //solid button hover effect
        $.cssHooks.backgroundColor = {
            get: function(elem) {
                if (elem.currentStyle)
                    bg = elem.currentStyle["backgroundColor"];
                else if (window.getComputedStyle)
                    bg = document.defaultView.getComputedStyle(elem,
                        null).getPropertyValue("background-color");
                if (bg.search("rgb") == -1)
                    return bg;
                else {
                    bg = bg.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),?(\s*\d*\.?\d*)?\)$/);
                    function hex(x) {
                        return ("0" + parseInt(x).toString(16)).slice(-2);
                    }
                    return "#" + hex(bg[1]) + hex(bg[2]) + hex(bg[3]);
                }
            }
        }

    Hope this helps someone :)

     

     

    edit: Add note about using child theme for JS file overrides.

  •  982
    ThemeNectar replied

    Hey Tyler!

    Thanks a lot for posting the problem & solution you've created for this conflict - i'll note to reexamine the use that function and perhaps implement your solution :)

    Cheers!