Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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

Custom Widget showing on left sidebar and not in the right sidebar


  #1  
Old Nov 25, 2011, 05:27 AM
rlaunay
 
2 posts · Nov 2011
Hello,

first of all thanks for the great works on Atahualpa theme !
i made a custom widget which only purpose is to display a blank div, only on home page.
the widget output code is as follow :
PHP Code:
echo "<!-- Debut homespace widget -->";
if(
is_front_page()||is_home()):
    echo
"<div style='height:".$spacesize."px;'></div>";
endif; 
for some odd reason , is_home and/or is_front_page returns false on the right sidebar while it returns true on the left one when i'm actually on the home page.
i tested with another 3 columns theme and its working properly.
Any idea ?
  #2  
Old Nov 25, 2011, 06:31 AM
juggledad's Avatar
juggledad
 
23,684 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Quote:
i made a custom widget
what do you mean by this.

I just added a text widget to the right and left sidebar and used the 'widget logic' plugin and added
HTML Code:
is_front_page()||is_home()
to both and it works as you would expect.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 25, 2011, 06:56 AM
rlaunay
 
2 posts · Nov 2011
i meant i made a very simple plugin with a WP_Widget derived class.
in the admin panel i can add my widget then and set the height of the div tag on home page.

I didnt know "Widget Logic" plugin , so i installed it and tested what you did and i get same result

the text widget appears on the left but the same one on the right doesnt.

2 thing i have to say though :
- first i edited quite a few line in the index.php file of Atahualpa theme.
- second i added a home.php to customize my homepage but the following code remain the same at beginning.
PHP Code:
list($bfa_ata$cols$left_col$left_col2$right_col$right_col2$bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header(); 
extract($bfa_ata); 
i will test with nother blog on a vanilla atahualpa theme to see if the probleme is from me messing around php file.

Thanks,

[edit]
it's working with a vanilla atahualpa so i guess i'll look into the changes i made .
sorry

Last edited by rlaunay; Nov 25, 2011 at 07:09 AM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have 2 pages widget in Left Sidebar soni Atahualpa 3 Wordpress theme 1 Oct 26, 2010 05:12 PM
[SOLVED] The Left Sidebar is showing only one category; there should be three categor JimTrail Sidebars & Widgets 4 Sep 13, 2010 07:10 PM
[SOLVED] Hide left sidebar on just one custom php page that isn't in the options list marced Sidebars & Widgets 13 Mar 2, 2010 02:35 PM
Can't add a text widget to left sidebar sirabi Sidebars & Widgets 3 Jan 11, 2010 06:26 AM
Indenting left margin without a left sidebar showing rhymes Sidebars & Widgets 0 Apr 28, 2009 10:02 PM


All times are GMT -6. The time now is 01:07 AM.


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