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)
-   -   HELP - custom widget areas no longer work in 3.6.7 (http://forum.bytesforall.com/showthread.php?t=14852)

azazure Jul 10, 2011 11:26 AM

HELP - custom widget areas no longer work in 3.6.7
 
I finally got brave and decided to upgrade to 3.6.7 (using WP 3.2) after reading that my custom widget areas would still work. The upgrade did create the custom widget areas (I have 4) but none of the widgets work now. I looked at index.php and don't even see where the code is located to create my custom widgets even though they show up in Administration. I'm totally confused and my site is down until I can resolve this. I have searched the forums for the answer so I guess I'm the only fool who can't figure this out! LOL

lmilesw Jul 10, 2011 12:02 PM

Where were the custom widget areas and is that code showing in 3.6.7?
Did you do a manual or automatic upgrade?

If some of the widget areas where placed in one of the center column areas there is currently no way to replicate in 3.6.7 without modifying a theme file. This will hopefully be addressed in a future release.

If you did the recommended manual upgrade you can just activate that install to at least get you working.

azazure Jul 10, 2011 12:13 PM

The custom widget area in the footer is fine. I have 3 custom widget areas in the center column which don't display my widgets - no errors, just no widgets! I did an automatic update instead of a manual update, why would there be a difference? Is it that the custom widget areas would only work if you do a manual update? I don't remember reading that.

Anyway, I have put too much work and time into this upgrade and I'd rather not go backwards, I'd rather keep moving forward to resolve the issue. What's the best approach? I'd rather modify an additional theme file rather than overwrite everything I just modified.

Thanks for your help!

juggledad Jul 10, 2011 12:15 PM

You need to put the 'New widget area' code into index.php

lmilesw Jul 10, 2011 12:22 PM

First of all you don't have to overwrite anything to "go back". All you have to do is go to wordpress.bytesforall.com and download the previous version and then follow the instructions for a manual upgrade in Upgrading FAQ.

If you want to add the widget areas you will need to edit the index.php file and add the widget code in the appropriate areas. My suggestion would be to edit a copy of index.php and instead of overwriting the current file just rename it before uploading the new one. That way if it doesn't work you can just delete the one you just uploaded and rename the original back to index.php.

You can hopefully, by looking at the code of index.php, determine where the new widget area code should go.

azazure Jul 10, 2011 12:28 PM

Thanks you guys, I will try that and report back. It seems weird to me that they would show up at all in the widgets area when they don't appear in the index.php file. Let me get to work and I'll let you know how it goes.

azazure Jul 10, 2011 12:59 PM

I created a widget area above the loop, inside the loop and below the loop - each with a different name. The result was that it created a single mystery widget area with no name instead of creating three different widget areas. When I put a text widget there it appears in all the appropriate places, but I need three distinct widgets for different content. Here is my code:

' <?php // Deactivated since 3.6.5
# include 'bfa://content_above_loop';
// Uses the following static code instead: ?>
<?php bfa_widget_area('Center Above Loop'); ?>
<?php bfa_next_previous_page_links('Top'); // For MULTI post pages if activated at ATO -> Next/Previous Navigation: ?>
<?php if( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } // For the plugin Page2Cat http://wordpress.org/extend/plugins/page2cat/ ?>

<?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>

<?php // Deactivated since 3.6.5
#include 'bfa://content_inside_loop';
// Uses the following static code instead: ?>
<?php bfa_next_previous_post_links('Top'); // For SINGLE post pages if activated at ATO -> Next/Previous Navigation ?>
<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
<?php } ?>
<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
<?php bfa_widget_area('Center Inside Loop'); ?>
</div><!-- / Post -->

<?php endwhile; ?>

<?php // Deactivated since 3.6.5
# include 'bfa://content_below_loop';
// Uses the following static code instead: ?>
<?php bfa_next_previous_post_links('Middle'); // Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: ?>
<?php bfa_get_comments(); // Load Comments template (on single post pages, and static pages, if set on options page): ?>
<?php bfa_next_previous_post_links('Bottom'); // Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: ?>
<?php bfa_archives_page('<div class="archives-page">','</div>'); // Archives Pages. Displayed on a specific static page, if configured at ATO -> Archives Pages: ?>
<?php bfa_next_previous_page_links('Bottom'); // Displayed on MULTI post pages if activated at ATO -> Next/Previous Navigation: ?>
<?php bfa_widget_area('Center Below Loop'); ?>

<?php /* END of: If there are any posts */'

azazure Jul 10, 2011 02:01 PM

Not to be rude, but my site has been down all day for this upgrade and I'm not getting a response from my last post. Should I be restoring from backup now or do you think we can resolve the problem? Just getting a little stressed....

lmilesw Jul 10, 2011 02:08 PM

The code for the new widget areas should follow this syntax
HTML Code:

<?php bfa_widget_area('name=My new widget area'); ?>
For instance your content below the loop area should look like the following.
HTML Code:

<?php bfa_widget_area('name=Center Below Loop'); ?>
Your forgot name=

azazure Jul 10, 2011 02:40 PM

Thanks, but it still doesn't work. I tried re-naming the widget area and also putting the apostrophe after the equal sign but nothing works. I have refreshed the widget page several times and they never show up. Here's what I have now:

<?php bfa_widget_area('name=Above Loop'); ?>

juggledad Jul 10, 2011 03:00 PM

how are you editing the code? are you using a TEXT EDITOR or WORD PROCESSOR?

azazure Jul 10, 2011 03:02 PM

Notepad ++ which has always worked for me when editing these files.

lmilesw Jul 10, 2011 03:21 PM

Did you try deleting the widget areas in "Add New Widget Areas" before creating the new ones? I just put the code in my test site as you said you had it for you for the "below the loop" widget area and it showed up fine.

azazure Jul 10, 2011 03:33 PM

No, I didn't know I was supposed to do that. But that's why I tried re-naming them, thinking that there was a conflict.

I re-named version 3.6.7 to atahualpa367 and restored my old atahualpa from last night's backup and made 3.6.4 my current theme. I needed to get my site back up.

At least now I can work on 3.6.7 and still be able to go back to 3.6.4 in the interim. I didn't realize I could do that until I read the manual install instructions. My bad, but I always thought "why do a manual install when you can do it automatically?" Now I know, so that's a good thing.

I really did try to do my due diligence and research everything and thought I was ready to go with this upgrade. I took out all my php from the theme except for the widget areas thinking that those would be preserved. If I can just figure out why I can't re-create these custom widget areas in 3.6.7 I'll be ready to try it again.

azazure Jul 10, 2011 04:10 PM

BTW thank you for your help. Atahualpa made it possible for me to create a site without knowing anything. I've learned a LOT since I started 6 months ago and I appreciate your patience.


All times are GMT -6. The time now is 12:58 PM.

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