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 » Center area post/pages »

[SOLVED] Adding widget area to home/center column, but not post/page


  #1  
Old Feb 16, 2012, 08:04 PM
JennyD
 
2 posts · Feb 2012
Goal: My widget area as what displays on the front page/center column, and the single post display and page display normal. Ideally, able to display one or more posts before the widget, but that's not a must.

I found myself able to add PHP code to add a widget area to the center column, by editing index.php.

Any suggestions?


I was also able to comment out the posts, since I can't seem to set it to display 0. On the front page, it works fine!

On a single-post page, I get whatever text I've added for the post, plus the widget. Oops.

I tried "Widgets on Pages" plugin, but it was having issues; I would consistently get a 404 error upon first viewing the site, and have to refresh for the widget to show up. I also had difficulties in styling the widget output when showing on a page vs. on the front/index page.

Atahualpa 3.7.3
WordPress 3.3.1

Note: If I were to want to display posts on the front page -- excerpt and some limited info -- where would I edit what gets displayed (parts/styling)?

Last edited by JennyD; Feb 16, 2012 at 08:14 PM.
  #2  
Old Feb 17, 2012, 02:59 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Just add some logic before the widget area code i.e.
HTML Code:
if (is_front_page()) {.......new widget area code here....}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Feb 17, 2012, 11:35 AM
JennyD
 
2 posts · Feb 2012
Thanks, that worked! More specifically:

<?php if (is_front_page())

{bfa_widget_area('name=WidgetName');} ?>

I'll look around for styling info and make a separate thread if needed for that question.

Thanks for the quick response!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Added center column widget showing in Widget area, but not displaying on pos tsheridan Sidebars & Widgets 2 Dec 22, 2011 09:50 AM
Adding a section (or widget) between center column and footer ssoszka Sidebars & Widgets 1 Dec 21, 2010 03:09 PM
Adding more than one custom widget area to the center column maguai Sidebars & Widgets 9 Mar 1, 2010 03:02 PM


All times are GMT -6. The time now is 08:26 PM.


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