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)
-   -   Some encouragement for Flynn re: new widget areas (http://forum.bytesforall.com/showthread.php?t=3566)

paulae Sep 23, 2009 09:49 AM

Some encouragement for Flynn re: new widget areas
 
I know Flynn is working hard to get this already amazing theme ready for its close-up. While I had some trouble getting new widget areas to show up properly, and then getting rid of traces of them in the widgets admin area, I also had some success on a test site.

Some background: I'm using the Sponsors Slideshow Plugin to make several instances of banner ads. Our newspaper has many advertisers who all want to be on the front page, and just about everywhere on the site. How to satisfy all of them? A slideshow is the obvious way. Before we switched to Wordpress, we used a cgi Perl script called csBanner. We are still using the code for it, hard-coded into Atahualpa's header config file, for our top-of-site banners. But I wanted to be able to have a regular widget area up there, not just in the sidebars, and now we're able to do it.

I'm taking it slowly, using a test site to try out these ideas. It's ugly now, but I need to see how it all works together: a Sponsors Slideshow widget area under the logo, and one in the right sidebar. http://www.skilovers.com/wp/ On the real site, we'll have those two as well as 2 more in the right sidebar, stacked up.

So, Flynn, keep up the great work, because you are getting really close! Once I'm sure this is all going to work, I'll switch the newspaper site from ATA 3.2 to 3.4.2 and get it all in place. Thank you for this wonderful theme.
:)

Flynn Sep 23, 2009 12:05 PM

Thank you, Paula

Except the cannot-be-removed issue (bummer, but fixed in 3.4.3) is there anything else that should be changed regarding custom widget areas?

juggledad Sep 23, 2009 12:56 PM

1) in a fresh install of WP as soon as you activate Atahualpa 3.4.2 and go to the Appearances->Widgets a blank widget area appears. I beleive this is because in Functions.php line 45:
HTML Code:

        // Register additional extra widget areas:
        $bfa_ata_extra_widget_areas = maybe_unserialize(get_option('bfa_widget_areas'));

has a value so the for loop runs once and you get the blank widget area.

2) It seems you can't have a header widget and a footer widget at the same time. It seems that each time the function bfa_widget_area() is called, it wipes out the previous members of the array!

Also there is one array $bfa_ata_extra_widget_areas and another $bfa_ata_widget_areas. What is the difference between them?

3 Also at ATO->Add new WIDGET AREAS->Example - it says ''...widget area cells (default: 1).' but in functions.php -> function bfa_widget_area the default is set to '3'

paulae Sep 23, 2009 03:12 PM

Yes, Flynn, if those items Juggledad mentions aren't fixed in 3.4.3, they do need to be addressed.

Maybe you could make the instructions for entering new widget areas a bit clearer. How about even a commented-out "You can put the new widget area code HERE" prompt in the areas where this can go?

Would it be possible to make the bar1 and bar2 areas widget-ready? Or add another completely empty ad space up there, which would be invisible unless populated with a widget?

And would it be possible, for those of us trying to use WP/ATA as a CMS, to have some kind of built-in Widget Logic for the widgets? For instance, I'm using a combination of Widget Logic code and the Section Widget plugin to make some of the sidebar widget and header widget areas appear only on certain categories. (I've gone pretty much away from the custom PHP code you wrote for us, since I want to eventually get the site to the point where a non-techie person can manage it, without having to come to you for help.) I've learned how to do this combo, but it's kludgy. It would be a real dream if you could write it into the theme, really the Holy Grail for people like me who keep pushing the envelope of what this theme can do. (I should mention that I haven't yet found a really good ad management plugin that will do everything I want, without all these work-arounds.)

Over at http://www.skilovers.com/wp/ you will see that I have sidebar and header ads for the Garden Guide that do not appear anywhere else, and neither do the "main" ads appear in Garden Guide. This kind of flexibility is key for us, since we have advertisers who exclusively sponsor a category. I'm sure many other webmasters could find uses for this kind of functionality. I'm glad I've got it working now and will be eager to see if I can keep it working on the "real" site, the Gazette.

Many thanks for all you do, Flynn. You're amazing.

Flynn Sep 23, 2009 07:13 PM

Quote:

Originally Posted by juggledad (Post 15127)
1) in a fresh install of WP as soon as you activate Atahualpa 3.4.2 and go to the Appearances->Widgets a blank widget area appears. I beleive this is because in Functions.php line 45:
HTML Code:

    // Register additional extra widget areas:
    $bfa_ata_extra_widget_areas = maybe_unserialize(get_option('bfa_widget_areas'));

has a value so the for loop runs once and you get the blank widget area.

2) It seems you can't have a header widget and a footer widget at the same time. It seems that each time the function bfa_widget_area() is called, it wipes out the previous members of the array!

Also there is one array $bfa_ata_extra_widget_areas and another $bfa_ata_widget_areas. What is the difference between them?

3 Also at ATO->Add new WIDGET AREAS->Example - it says ''...widget area cells (default: 1).' but in functions.php -> function bfa_widget_area the default is set to '3'

Thanks

1, 2 and 3 fixed.

paulae Sep 23, 2009 07:25 PM

Should we download the theme again, if it has these fixes? Or download but just install functions.php in an existing installation of 3.4.2?

Flynn Sep 23, 2009 07:26 PM

Paula, my understanding is that Widget Logic adds itself to all widgets (default WP widgets and 3rd party widgets) but it has no check boxes and requires the WP conditional tags http://codex.wordpress.org/Conditional_Tags like "is_page" to be used to control the appearance of widgets, whereas Section Widget does not add itself to any widgets but lets you create your own widget with HTML, PHP and shortcodes instead. But unlike Widget Logic, Section Widget has check boxes and does not require PHP code such as "is_page" to control where widget is displayed or not.

Is there any other problem with Widget Logic except that it requires "is_page", "is_home" etc...? Because those dozen or so WP conditional tags are very flexible (if you consider the combinations that you can create by combining them with AND, OR and brackets) and it would require quite a few check boxes and Javascript logic to replace that with an interface similar to Section Widget.

DesignFlute Sep 24, 2009 05:55 AM

With above 1, 2,3 fixed - does it mean we will be able to create new widget areas in the same area too?
for eg say in footer area two new widget areas A & B are created - A with 1 cell and B with 3/4 cells. will this be possible?
Thanks in advance.

paulae Sep 24, 2009 06:04 AM

Flynn, yes, the thing that bothers me about Widget Logic is the necessity to learn those conditional statements and how they work. I enjoy it, but I am trying very hard to make the newspaper website easy for a non-techie person to manage. I want to retire, actually! The next people who take over the Gazette from my partner and me will probably want a more turn-key system.

Another good plugin I've found is Query Post, which also does the conditional statements "behind the curtain." However, it's a bit tricky to use, too.

You didn't answer my other question: are the fixes you mentioned available now? Should I download 3.4.2 again, and just grab functions.php from it?

Flynn Sep 24, 2009 06:44 AM

Quote:

Originally Posted by DesignFlute (Post 15180)
With above 1, 2,3 fixed - does it mean we will be able to create new widget areas in the same area too?
for eg say in footer area two new widget areas A & B are created - A with 1 cell and B with 3/4 cells. will this be possible?
Thanks in advance.

I tried that and it works. After a new widget area is added, it is required to load one of the front end pages once, before the widget area appears on the back end, at WP -> Appearance -> Widgets

Flynn Sep 24, 2009 06:45 AM

Quote:

Originally Posted by paulae (Post 15181)
Flynn, yes, the thing that bothers me about Widget Logic is the necessity to learn those conditional statements and how they work. I enjoy it, but I am trying very hard to make the newspaper website easy for a non-techie person to manage. I want to retire, actually! The next people who take over the Gazette from my partner and me will probably want a more turn-key system.

Another good plugin I've found is Query Post, which also does the conditional statements "behind the curtain." However, it's a bit tricky to use, too.

You didn't answer my other question: are the fixes you mentioned available now? Should I download 3.4.2 again, and just grab functions.php from it?

No it's not in 3.4.2 but will be in 3.4.3. I am not adding much more to 3.4.3 and try to release it later today or tomorrow.

paulae Sep 24, 2009 06:50 AM

Today or tomorrow? Perfect! I had planned to make the Big Switch from 3.2 to 3.4.2 this weekend, so that would be excellent! No pressure.....;)

paulae Sep 24, 2009 07:43 AM

Flynn, another idea for you: the Advanced Custom Field Widget plugin. I used a prior iteration on the Gazette for a time, but it broke in MSIE. Maybe this one fixes that problem: http://wordpress.org/extend/plugins/...-field-widget/

Again, just a way to put content in a sidebar/widget area and customize where it appears. I'm sure there are many uses for this, as there are many uses for custom fields.


All times are GMT -6. The time now is 05:59 PM.

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