1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

WordPress sidebar

Discussion in 'Content Management' started by dutzu, Aug 25, 2012.

  1. #1
    How could I add a sidebar to my wordpress theme ? What do I have to edit in CSS ?

    I edited some files but is not what I want. I want it like a sidebar on the right. This is the site: www.androidmaniac.net

     
    dutzu, Aug 25, 2012 IP
  2. PaulSch

    PaulSch Active Member

    Messages:
    781
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Take a look in the Themes and there should be a way of changing your layout to put the sidebar in position. If not then maybe think about changing your theme to one that has a sidebar.
     
    PaulSch, Aug 25, 2012 IP
  3. Mithuasha

    Mithuasha Banned

    Messages:
    1,056
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Mithuasha, Aug 26, 2012 IP
  4. EscalateSEO

    EscalateSEO Banned

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    23
    #4
    Click on Widgets in the left menu of the WordPress admin area and you should be able to add stuff to your sidebar from there.
     
    EscalateSEO, Aug 26, 2012 IP
  5. dutzu

    dutzu Well-Known Member

    Messages:
    149
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    138
    #5
    Yes. But the widget is not on the sidebar because it has no CSS.
     
    dutzu, Aug 26, 2012 IP
  6. dutzu

    dutzu Well-Known Member

    Messages:
    149
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    138
    #6
    I added the sidebar somehow but I can't put it on the right of the page.. Here is what i have done:
    In mainindex.php:
    <div id="sidebar-nou"><?php get_sidebar ('sidebar.php'); ?></div>
    PHP:
    In sidebar.php
    <?php if ( ! dynamic_sidebar( 'sidebar-nou' ) ) : ?>
    <?php endif; ?>
    PHP:
    CSS:
    #sidebar-nou {padding: 13px 10px 10px 10px; margin-bottom: 10px; background: #FFFFFF; border: solid 1px #ddd; border-top: 2px solid #c2c2c2; border-bottom: 2px solid #c2c2c2; }
    Code (markup):

    functions.php
    register_sidebar(array(        'name'=> 'Sidebarul meu',        'id' => 'sidebar-nou',        'before_widget' => '<li id="%1$s" class="widget %2$s">',        'after_widget' => '</li>',        'before_title' => '<h2 class="titlu-fiecare-widget">',        'after_title' => '</h2>',    ));
    PHP:
     
    dutzu, Aug 26, 2012 IP
  7. nufox

    nufox Peon

    Messages:
    749
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can just add widgets actually
     
    nufox, Sep 5, 2012 IP
  8. varts

    varts Greenhorn

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #8
    As nufox said: widgets are the easiest way!
     
    varts, Sep 11, 2012 IP
  9. nufox

    nufox Peon

    Messages:
    749
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Yes as the widget can be easily drag and drop.
     
    nufox, Sep 11, 2012 IP
  10. xuled

    xuled Banned

    Messages:
    286
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I think you can get your side bar back by choosing the appropriate page template. Also you can do that if your installed theme has the option to do so.
     
    xuled, Sep 15, 2012 IP