Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Unable to change the sidebar. (http://forum.bytesforall.com/showthread.php?t=14649)

bsprowl Jun 15, 2011 10:43 AM

Unable to change the sidebar.
 
I'm using Atahualpa 3.4.9 and Wordpress 3.0.5.

I wanted to replace the default sidebar with some links and found a sample file format (not sure exactly where at this moment) that I used to create the simple sidebar php file below and saved it to the themes directory with the name “sidebar-left.php” (later changed to “sidebar_left.php” - I don't know which name best matches the naming conventions):

<?php

add_action( 'widgets_init', 'my_register_sidebars' );

function my_register_sidebars() {

/* Register the 'left' sidebar. */
register_sidebar(
array(
'id' => 'sidebar-left',
'name' => ( 'left sidebar' ),
'description' => ( 'Sits on the left side of all pages.' ), 'before_widget' => '<div id="%1$s" class="widget %2$s">',
<p><a href="http://www.facebook.com/update_security_info.php?wizard=1#!/pages/Carolina-Vision-Center/237350326657">Our Facebook page</a></p>
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>'

)
}

?>


I opened the site – carolinavisioncenter.com - and found that it does not have this Facebook link in the leftside bar. The displayed sidebar is unchanged. Tried the second name listed above after changing the “id” within the file with the same results.

I checked and this file is available in the Atahualpa editor so I assume that saved in the right place.

I probably missed some basic step but I don't have a clue as to what it might be.

juggledad Jun 15, 2011 10:59 AM

you don't need to add anything. If you want to replace the default WIDGETS, just add a WIDGET to the SIDEBAR and the default ones will go away.

bsprowl Jun 15, 2011 12:33 PM

I do not understand your reply.

Yuo did not tell me what my error might be or how to do that which you suggest.

I have no idea how to add a widget or what a widget might be.

Bob

juggledad Jun 15, 2011 12:46 PM

Atahualpa provides you with up to four sidebars, you don't need to add any sidebar.php code.

Wordpress adds some DEFAULT widgets to the sidebars. Once you add your own widget to the sidebar, the default widgets will go away. Try it, add a widget to the left and right sidebar and see what happens.


All times are GMT -6. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.