Site logo

Archived topic

Make sidebar more narrow

2 replies · Started by Anonymous on May 13, 2016

Viewing posts 1–3 of 3

That's something that i think is out of the scope of the spacing add-on and the way a sidebar should be used.

Why don't you try something like this for that socialbar:

http://www.jqueryscript.net/social-media/jQuery-Plugin-For-Horizontal-Floating-Social-Share-Bar.html

You can fast test it doing like this on your hooks add-on

On your wp_head hook add this:


<link href="http://www.jqueryscript.net/demo/jQuery-Plugin-For-Horizontal-Floating-Social-Share-Bar/css/floating-share.css" type="text/css" rel="stylesheet">

in your wp_footer hook, this:


<!-- Begin Floating Share  -->

<script type="text/javascript">
    jQuery(function(){
    jQuery("body").floatingShare();
     });
</script>

<script type="text/javascript" src="http://www.jqueryscript.net/demo/jQuery-Plugin-For-Horizontal-Floating-Social-Share-Bar/js/jquery.floating-share.js"></script>

<!-- End Floating Share  -->

If you plan to use it permanently consider adding the script to your child theme or at least put the jquery.floating-share.js and the floating-share.css where you know it will always be.

Peace :)

I agree with Roberto - that looks like a better solution.

However, you can decrease the sidebar width with something like this:

add_filter( 'generate_left_sidebar_width','generate_custom_left_sidebar_width' );
function generate_custom_left_sidebar_width()
{
      return '10';
}

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

This archived topic is closed to new replies.