This topic has 9 replies, 3 voices, and was last updated 8 years by sharmstr.

  • Author
  • #72068
     Norman
    Participant

    Hi the new Revslider update is amazing,
    I am wondering how I can add a revolution slider in my member-activity page.
    ( attached a screenshot for the positioning. It should be full width under the menu but over the update window, if possible)
    Revolutionslider creates a shortcodes.
    Thanks for help !!
    N.

    Attachments:
    You must be logged in to view attached files.
    #72071
     sharmstr
    Moderator

    Revolution slider has been a shortcode since day 1. 🙂

    Anyhow, add this to your functions.php file

    COPY CODE
    
    add_action('kleo_before_content','slider_on_activity');
    function slider_on_activity() {
        if ( bp_current_component() == 'activity') {
            putRevSlider("HomeFullwidth");
        }
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #72072
     Norman
    Participant

    HomeFullwidth is the shortcode of the slider ?

    #72073
     sharmstr
    Moderator

    Yes. Change it to your slider.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #72074
     Norman
    Participant

    thanks !!

    #72075
     Norman
    Participant

    @sharmstr
    one more question:
    is it also possible to display the slider ONLY on the member-acitivity page
    and not aswell on the user profile pages ?

    #72088
     sharmstr
    Moderator

    I know there is but I dont remember it off the top of my head. Take a look through the buddypress documentation or search their forum. I’m sure its been discussed to death. https://codex.buddypress.org/developer/template-tag-reference/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #72169
     sharmstr
    Moderator

    Hey Norman,

    This should work

    COPY CODE
    add_action('kleo_before_content','slider_on_activity');
    function slider_on_activity() {
        if ( bp_current_component() == 'activity' && !bp_is_user()) {
            putRevSlider("HomeFullwidth");
        }
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #72442
     mladas
    Participant

    Is there code that can be added to functions.php file that will enable the revolution slider described above to only be shown on mobile devices? Obviously with other pages, it is easy by simply “checking the box” in the specific row, but that is not an option with the Activity page. Specifically, what is the code to enable the following:

    visibility=”hidden-sm,hidden-md,hidden-lg,visible-xs”

    Thank you in advance for your help.

    #72688
     sharmstr
    Moderator

    You can try echoing out the classes within a span tag

    COPY CODE
    
    add_action('kleo_before_content','slider_on_activity');
    function slider_on_activity() {
        if ( bp_current_component() == 'activity' && !bp_is_user()) {
            echo '<span class="hidden-sm hidden-md hidden-lg visible-xs">';
            putRevSlider("HomeFullwidth");
            echo '</span>';
        }
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 10 posts - 1 through 10 (of 10 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?