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)
-   -   Custom Widget showing on left sidebar and not in the right sidebar (http://forum.bytesforall.com/showthread.php?t=16088)

rlaunay Nov 25, 2011 04:27 AM

Custom Widget showing on left sidebar and not in the right sidebar
 
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 ?:confused:

juggledad Nov 25, 2011 05:31 AM

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.

rlaunay Nov 25, 2011 05:56 AM

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


All times are GMT -6. The time now is 03:50 AM.

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