Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] How to style widgets in a new widget area


  #1  
Old Sep 21, 2010, 02:51 AM
mathmojo
 
21 posts · Oct 2009
[SOLVED] How to style widgets in a new widget area

Well, I've wrestled with it for two days now, and I give up. Time to ask the experts.
I created a new widget area in center column by doing this:

I put this is in the loop,

<?php bfa_widget_area('name=daily specials'); ?>

between

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

and

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

Then I put this in functions.php:

register_sidebar(array(
'name'=>'daily specials',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title"><h3>',
'after_title' => '</h3></div>',
));

Then I made a bunch of text widgets and dragged them onto a page, (only one specific page, using Display Widget plugin)

It worked out well. I'd like to style those widgets, though. They can all be styled the same, so I suspect I only need to change the style for the widget area, which I named "daily specials".

I cannot figure out what to change, or what to add in order to be able to style that area. As it stands, the area has the same styling as all other text widgets, like the one in the left nav bar.

I don't want to change the style of the one in the nav bar, just the new widget area on the one page.

Got any suggestions? I don't want to tear out the hair I've got left.

Thanks so much for your attention to this.

_ Brian
  #2  
Old Sep 21, 2010, 04:26 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Why did you do anything to functions.php? I don't get what you are trying to do there?? are you looking to add a new widget area to the sidebar?

Where is this new widget area showing up?
(I must say you have confused me )
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Sep 21, 2010, 05:43 AM
mathmojo
 
21 posts · Oct 2009
Juggledad,
Thanks for the quick reply. Sorry I didn't explain better.

I did it in order to place a widget area in the body of a page. I tried to follow the directions at
http://forum.bytesforall.com/showthread.php?t=330

You check out the results so far at:
http://www.successininternetmarketin...aily-specials/

It's exactly how I wanted it except for the styling.

Thanks for giving it a look.

Brian
  #4  
Old Sep 21, 2010, 06:37 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Ah, that thread was BEFORE the new widget areas were added to the Theme, so you don't need it and it could (?) cause some issues.

to style the new widget area, you will need to look at the source of the page to create the CSS Selectors and CSS rules. Your source is
HTML Code:
<div id="daily_specials" class="bfa_widget_area">	
	<div id="text-6" class="widget widget_text">
		<div class="widget-title"><h3>Wash House</h3></div>			
		<div class="textwidget">Turkey, Roast Beef & Ham With American Cheese, Leafy Green Lettuce, Tomato & Mayonnaise</div>
	</div>
	<div id="text-7" class="widget widget_text">
		<div class="widget-title"><h3>The Shepard Ave</h3></div>			
		<div class="textwidget">Thinly Sliced Turkey With Swiss Cheese, Lettuce, Tomato & Mayonnaise</div>
	</div>
.
.
.
	<div id="text-19" class="widget widget_text">
		<div class="widget-title"><h3>Ferdinand’s Eggplant </h3></div>			
		<div class="textwidget">Eggplant Parmigiana Served As An Open Face Sandwich</div>
	</div>
</div>
so you can use
#daily_specials .widget-title {...} to style the titles
#daily_specials .textwidget {...} to style the descriptions
#daily_specials #text-7 .textwidget {...} to style the description of the 'The Shepard Ave'
etc, etc

p.s. I'll have THE PO BOY
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Sep 21, 2010 at 06:40 AM.
  #5  
Old Sep 21, 2010, 08:32 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
And I'll have Ferdinand's Eggplant and I live closer so I may even give it a try.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #6  
Old Sep 21, 2010, 11:17 AM
mathmojo
 
21 posts · Oct 2009
Thanks a load guys. I tried it and it's working fine.

One more thing, though. Is there a way for me to style the borders of just the widgets in the body of the page without it effecting the sidebar text widgets. I've tried inserting { border: 0; } in all of the three of these
#daily_specials .widget-title {text-align:center;}
#daily_specials .textwidget {text-align:center;}
#daily_specials #text-7 .textwidget {}

but none of them overrode the default text widget setting. I'd like to get rid of the borders in the "sandwich widgets" as well as the little white bar seperating the text from the description.

Any thoughts?

Thanks, and the sandwiches are on me if you ever get down to our pleasant area.

Bookmarks

Tags
widget area style



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Widgets - Widget Area Problem annsworld Sidebars & Widgets 4 Mar 21, 2010 01:54 PM
[SOLVED] New WIDGET AREA is not showing up in Dashboard - Appearance - Widgets merle Sidebars & Widgets 5 Feb 20, 2010 12:35 PM
Customize text template as setting in ATO>>Sidebars & Widgets>>Style Widget bigliettaio Sidebars & Widgets 4 Jan 17, 2010 02:18 PM
Added Widgets to Header area and now Widgets won't go away from Widgets page kippiper Header configuration & styling 5 Nov 12, 2009 04:33 PM
Set left sidebar widgets same distance from center area as right sidebar widgets daisy24 Sidebars & Widgets 2 Feb 19, 2009 05:11 AM


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


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