WordPress.org

Forums

adding more sidebars (7 posts)

  1. Radhesyam.bap
    Member
    Posted 6 years ago #

    Hi folks,

    I am trying to add 2 more sidebars to my site.

    (the site came with 2 sidebars already installed)

    I have read many tutorials and followed them all with no success.

    What I have accomplished so far :
    In functions.php I have changed the line

    register_sidebars(2,array(

    to register_sidebars(4,array(

    so now when I go into my admin panel>widgets> i see 4 sidebars active.

    My BIG problem is that I cannot work out how to get these 2 NEW sidebars to appear on the site. (and I have tried a lot of different cut-and=paste codes from tutorials)

    You can see my site here:
    http://www.vaisnavi.org/v3/
    I am trying to place these new sidebars (2 side by side) UNDERNEATH the posts content (on the right)

    Any help is greatly appreciated I am going nuts!
    Thanks in advance

  2. Charles E. Frees-Melvin
    Member
    Posted 6 years ago #

    if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar('nameofsidebar') ) :
     endif;
  3. Radhesyam.bap
    Member
    Posted 6 years ago #

    My sidebars don't have names (?)
    also:
    where in te code would I out this ? does it come AFTER the content 'div' ?

    PS I just discovered for some REALLY weird reason...
    my site only loads when you access it as :
    http://vaisnavi.org/v3/

    it is totally blank when access using the www. bit in the URL
    (this is in all browsers and yes Ive cleaned my cache)

    this new wordpress is just TOO buggy for me
    i did 3 sites in the previous version and all of them are perfect including widgets
    I'm going to be here for the next hour taking down te site and installing it again
    so excuse me if you loook and its not there!

    Thanks

  4. s_ha_dum
    Member
    Posted 6 years ago #

    My sidebars don't have names (?)

    Yes they do. Look at the codex.

    This will create 2 sidebars named “Foobar 1″ and “Foobar 2″:

    register_sidebars(2, array('name'=>'Foobar %d'));

    You then have to insert the code via the code thee17 gave you. Put the code wherever it is that the sidebars need to load. Your theme should already have a live much like the one thee17 gave you. Find it. Its probably in your header.php or your footer.php, but no promises. By the way, its in the codex.

    If it were me, though, I'd give them names on purpose so that they have some kind of meaning as you work with them-- top-left, bottom-right, that sort of thing.

    PS I just discovered for some REALLY weird reason...
    my site only loads when you access it as :
    http://vaisnavi.org/v3/

    it is totally blank when access using the www. bit in the URL
    (this is in all browsers and yes Ive cleaned my cache)

    This is more of a server configuration problem than a WP one. Maybe see this thread.

    this new wordpress is just TOO buggy for me

    Or you aren't reading the codex.

  5. Radhesyam.bap
    Member
    Posted 6 years ago #

    okso following te instruction given in that Codex tutorial age
    I cut and paste exactly as they had it on their site
    I uploaded the file]\hit refresh and the whole site was gone blank.

    (so I rolled it back)

    is it possible that this has something to do with the theme i am using?

    PS my site is back online
    http://www.vaisnavi.org/v3/

  6. s_ha_dum
    Member
    Posted 6 years ago #

    okso following te instruction given in that Codex tutorial age
    I cut and paste exactly as they had it on their site
    I uploaded the file]\hit refresh and the whole site was gone blank.

    Then you did something wrong. Its hard to say exactly what. Cutting text from online and pasting into source code is dangerous, for one. Sometimes it works. Sometimes it fails. Somehow, you introduced an error. Try to understand what the script does and then recreate it, rather than just paste.

  7. Radhesyam.bap
    Member
    Posted 6 years ago #

    Thanks for all the help guys

    well I discovered that yet again there is a way to get around the ubergeek coding.

    I just used php include call which called to a file i created called sidebar2.php (a duplicate of sidepar.php , except for the sidebar numbers of course)

    ..seriously, one of these days im going to have to learn php (i've only been using comuters since 1985 :-P )

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags