• Resolved malevolentia

    (@malevolentia)


    Feels like I’ve tried everything…

    How do I make a sidebar/widget to display horizontally? I thought simple CSS would fix it but no luck so far. Even tried some plugins even though I don’t really want to use one but no luck their either.

    Want a sidebar/widget to display photos horizontally.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    Thread Starter malevolentia

    (@malevolentia)

    Hey!

    I wan’t boxes like these to be shown horizontally when added to a widget. They are in a dynamic sidebar now.

    https://gyazo.com/733ab8b0935905ac469dca76ffa67ce5

    Just to make it super clear – it’s a dynamic sidebar and I’ve added widget boxes in it but I want them to be displayed horizontally. ??

    • This reply was modified 7 years, 10 months ago by malevolentia.
    • This reply was modified 7 years, 10 months ago by malevolentia.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I asked for a link to your site, not a screenshot. Link, plz. ??

    Thread Starter malevolentia

    (@malevolentia)

    I don’t want to post my site’s url here if I can’t remove it afterwards? ?? Or can I?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    When you feel comfortable posting a link, please do so. My feeling is that if I’m doing private work, then it’s private and not helping the community. And that doesn’t belong here.

    Thread Starter malevolentia

    (@malevolentia)

    It’s just that it’s on my “dev url” and not where the customer will have it’s site and I don’t want that specific one to be public. But I’m not working live. ??

    I do understand you though!

    But is WordPress set on having sidebars/widgets vertically? It seems like it’s a hard thing to get it horizontally or?

    Thread Starter malevolentia

    (@malevolentia)

    This is how the widgets gets coded. I’ve tried ‘float: left;’ and ‘display: inline-block;’ and such.

    <div class="dogs">	
    
    <aside id="text-10" class="widget widget_text">
    <h3 class="widget-title">Box 1</h3>			
    
    <div class="textwidget"><img src="IMGURL" /></div>
    		</aside>
    
    <aside id="text-11" class="widget widget_text"><h3 class="widget-title">Box 2</h3>			
    <div class="textwidget"><img src="IMGURL" /></div>
    		</aside>
    
    </div>
    Moderator bcworkz

    (@bcworkz)

    WordPress core is agnostic on how widgets layout. Your theme may be working against you for implementing the usual solutions. Without a live link it’s impossible to say for sure.

    Thread Starter malevolentia

    (@malevolentia)

    Does it help to show which theme base I use?

    https://themekraft.com/tk-wordpress-bootstrap-starter-theme/

    Otherwise I will try and upload it on another domain. Just a lot of work ??

    Thread Starter malevolentia

    (@malevolentia)

    Just want to share the solution I came up with, maybe it will help someone!

    This will only work on Bootstrap based themes like mine though.

    When you have added the sidebar to the functions.php file:

    register_sidebar( array(
    ‘name’ => __( ‘SIDEBAR NAME’),
    ‘id’ => ‘SIDEBAR ID’,
    ‘before_widget’ => ‘<div class=”col-sm-3″>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h3 class=”WIDGET TITLE CLASS”>’,
    ‘after_title’ => ‘</h3>’,
    ) );
    }

    Just simply add the bootstrap squares to be displayed before and after widget – <div class=”col-sm-3″> Widget content will be here </div>.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Getting sidebar/widget to display horizontally’ is closed to new replies.