Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #993838
    hanicoffee
    Participant

    Hi there,
    Do you have any recommendations for plugins that allow me to add a “sticky” button or any content to the side of the website as like a sort of CTA? Or does X-THEME have any of these functionalities already?

    It can be like a narrow and long column on the side and needs to look good with the rest of the site. I don’t want it to be the sidebar but actually a floating column attached to the side.

    If you can’t recommend good plugins could you please tell me the code that will be most compatible with the theme that will help achieve this feature?

    I will attach a link to my site if it helps.

    Thanks!!

    #993839
    hanicoffee
    Participant
    This reply has been marked as private.
    #993898
    Rahul
    Moderator

    Hi there,

    We can not recommend a plugin which we haven’t tested extensively to work with X theme.

    However, if you want to make your sidebar sticky, you can use by adding the following custom code :

    You would need both CSS and JavaScript.

    You can add this under Custom > CSS in the Customizer.

    @media screen and (min-width:979px){
    .fixedsidebar {
        position: fixed;
        top: 2.5%;
        right: 17.89%;
        width: 18%;
    }
    }

    add this under Custom > JavaScript also in the Customizer just below the Custom CSS.

    jQuery( function($){ 
    
    $(window).on('scroll', function(){
        var sidebar = $('aside.x-sidebar.right');
        if ( $( this ).scrollTop() >= $(sidebar).offset().top
     - 20 ) {
    console.log('fixed attached');
          $( sidebar ).addClass('fixedsidebar');
        } else {
          $( sidebar ).removeClass('fixedsidebar');
        }
    console.log('scrolled');
    });
    
    $(window).trigger('scroll');
    
    });

    Hope this helps!

  • <script> jQuery(function($){ $("#no-reply-993838 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>