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)
-   -   [SOLVED] Widgets don't showup in right sidebar (http://forum.bytesforall.com/showthread.php?t=3880)

susanhare Oct 13, 2009 09:36 PM

[SOLVED] Widgets don't showup in right sidebar
 
Also having sidebar problems. I read all the above posts and none seem to apply to my problem. Running Atahualpa 3.4.2/WP 2.8.4
site: www.cashdeal4house.com

Widgets and formatting working well in left side bar.
I want to add widgets to the right sidebar.
Formatted the right sidebar in ATO
Added widgets to right sidebar using accessibility options. Added titles and content. Saved settings. View site...nothing...a blank right sidebar.
I've changed every parameter I can think of. Nothing works. Any ideas?

Sue

juggledad Oct 14, 2009 05:09 AM

Just to check, at ATO->Style & configure SIDEBARS->RIGHT sidebar: Display on: - you do have all the items checked, right?

susanhare Oct 14, 2009 08:36 AM

For right sidebar, display on, all checked.
I added a left inner sidebar to test functionality on the left and it works.
Added a right inner sidebar, still nothing.
To be clear, space for the right sidebar exists...I see the 200px spacing I set; however, no background color, and the widgets do not appear.
Strange that widgets work on the left, not the right.
Next idea?

paulae Oct 14, 2009 08:44 AM

I've noticed that the right sidebar seems hinkier than the left, too.

juggledad Oct 14, 2009 09:38 AM

susan
what plugins do you have? I'm seeing an odd comment in the right sidebar when I look at the generated source. it is '<!--SH CHUNK OF CODE REMOVED-->'

try disabling all your plugins and see if you can add to the right sidebar.

susanhare Oct 14, 2009 12:42 PM

Removed all plug-ins--still nothing.
SH--CHUNK OF CODE REMOVED refers to something I (SH) did. Wish I was more descriptive. The only changes I recall making to the theme had to do with the header. I wanted the logo on the same line as the photos and I followed your instructions to change that code. It worked wonderfully. Can this be related?
Sue

juggledad Oct 14, 2009 12:59 PM

could be. Since you have mucked (don't you love technical terms :) ) with the code there could be some relation.
Please check footer.php that is where the right sidebar is built and since the strange comment is showing up just after the '<!-- Right Sidebar -->' comment...
the comment '<!-- Right Sidebar --> is on line 24 (version 3.4.4)
the comment '<!-- / Right Sidebar -->' is on line 67 (version 3.4.4)

what do you have (or not have) there?

susanhare Oct 14, 2009 01:15 PM

This is what I have: (I've been madly trying to find that reference and didn't think to look in the footer.) Clearly I need to add a chunk of code back in. Should I just upload a clean bfa_footer.php file? Will that cause me to reinvent the left side bar?

<?php if ( $bfa_ata['right_col'] == "on" ) { ?>
<!-- Right Sidebar -->
<!--SH CHUNK OF CODE REMOVED-->

<!-- / Right Sidebar -->
<?php } ?>

</tr>
<!-- / Main Body -->
<tr>

<!-- Footer -->

juggledad Oct 14, 2009 01:29 PM

wow you did muck with it. Yes you should upload a new copy.

Widgets added to sidebars are just another OPTION as far as wordpress is concerned. Remenber there are two parts to Wordpress, the CODE and the DATABASE. anything set in the backend (with the exception of editing theme code) gets stored in one of the database tables. When you add a plugin to the wp-contents/plugins folder you have added CODE, wen you activate it, you are changing a setting in the DATABASE. When you add a widget to a sidebar, you are changing an OPTION in the DATABASE. Most plugins and themes create rows in the wp-options table when you activate them (and very few remove those rows - playing with lots of plugins and themes can lead to lots of unused rows in the wp-options table) This is why you can add a theme to the themes folder, put all kinds of settings in, then remove the theme from the themes folder, wait a week and put it back in the themes folder and activate it again. Tada, the settings are still there because they have been sitting in the database all that time.

So (sorry for the ramble) the widgets in the left sidebar should be fine since they are stored in the database, so unless you were modifying the code to do someting unique you should be fine

susanhare Oct 14, 2009 01:59 PM

This may be way beyond a theme issue...but here's what happened.
Got a fresh and tidy bfa_footer.php file. Viewed the code...yep the Right Widget code was there.
Uploaded the file to the server. Viewed page. Nothing had changed. Downloaded the bfa_footer.php file from the server, viewed the code and it was vastly different from the file I uploaded. Tried again. Same problem. (Clearly holloween is approaching) .

CODE THAT MYSTERIOUSLY CHANGED ITSELF:
<?php

function footer_page_links($matches) {
$page_id = $matches[1];
$page_data = get_page($page_id, ARRAY_A);
$page_title = $page_data['post_title'];
$page_url = get_permalink($page_id);
return '<a href="' . $page_url . '">' . $page_title . '</a>';
}


function bfa_footer($footer_content) {

global $bfa_ata;



// page links
if ( strpos($footer_content,'%page') !== FALSE ) {
$footer_content = preg_replace_callback("|%page-(.*?)%|","footer_page_links",$footer_content);
}



// home link
if ( strpos($footer_content,'%home%') !== FALSE ) {
$footer_content = str_replace("%home%", '<a href="' . $bfa_ata['get_option_home'] . '/">' .
$bfa_ata['bloginfo_name'] . '</a>', $footer_content);
}



// login/logout link
if ( strpos($footer_content,'%loginout%') !== FALSE ) {

ob_start();
wp_loginout();
$loginout_link = ob_get_contents();
ob_end_clean();

if ( $bfa_ata['nofollow'] == "Yes" ) {
$loginout_link = str_replace(' href=', ' rel="nofollow" href=', $loginout_link);
}

$footer_content = str_replace("%loginout%", $loginout_link, $footer_content);
}



// register link
if ( strpos($footer_content,'%register%') !== FALSE ) {

ob_start();
wp_register();
$register_link = ob_get_contents();
ob_end_clean();

$register_link = str_replace( array('<li>', '</li>'), '', $register_link);

if ( $bfa_ata['nofollow'] == "Yes" ) {
$register_link = str_replace(' href=', ' rel="nofollow" href=', $register_link);
}

$footer_content = str_replace("%register%", $register_link, $footer_content);

}



/* LEGACY up to Atahualpa 3.2 admin link and register link were two different tags,
now they're combined into one tag %register% mimicking the wp_register() function */
if ( strpos($footer_content,'%admin%') !== FALSE ) {

ob_start();
wp_register();
$admin_link = ob_get_contents();
ob_end_clean();

$admin_link = str_replace( array('<li>', '</li>'), '', $admin_link);

if ( $bfa_ata['nofollow'] == "Yes" ) {
$admin_link = str_replace(' href=', ' rel="nofollow" href=', $admin_link);
}

$footer_content = str_replace("%admin%", $admin_link, $footer_content);

}



// RSS link
if ( strpos($footer_content,'%rss%') !== FALSE ) {
$footer_content = str_replace("%rss%", $bfa_ata['bloginfo_rss2_url'], $footer_content);
}



// Comments RSS link
if ( strpos($footer_content,'%comments-rss%') !== FALSE ) {
$footer_content = str_replace("%comments-rss%", $bfa_ata['bloginfo_comments_rss2_url'], $footer_content);
}



// Current Year
$footer_content = str_replace("%current-year%", date('Y'), $footer_content);


// PHP
// not for WPMU
if ( !file_exists(ABSPATH."/wpmu-settings.php") ) {

if ( strpos($footer_content,'<?php ') !== FALSE ) {
ob_start();
eval('?>'.$footer_content);
$footer_content = ob_get_contents();
ob_end_clean();
}

}


return footer_output($footer_content);

}
?>

juggledad Oct 14, 2009 02:14 PM

wrong one, you want FOOTER.PHP not bfa_footer.php
footer.php is in the atahualpa folder
bfa_footer.php is in the atahualpa/functions folder

susanhare Oct 14, 2009 02:23 PM

Now don't I feel silly. Someone needs to take away my keys to filezilla.

That indeed fixed the problem. You're the best.

paulae Oct 14, 2009 03:12 PM

Welcome to the "Wordpress Makes Me Act Like A Nincompoop" club.

:o

Seriously, if we didn't do dumb stuff like that, how would Juggledad get through the day??


All times are GMT -6. The time now is 10:49 PM.

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