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 »

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


  #1  
Old Nov 25, 2011, 04: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, 05:31 AM
juggledad's Avatar
juggledad
 
23,765 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, 05: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 06: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 04:12 PM
[SOLVED] The Left Sidebar is showing only one category; there should be three categor JimTrail Sidebars & Widgets 4 Sep 13, 2010 06: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 01:35 PM
Can't add a text widget to left sidebar sirabi Sidebars & Widgets 3 Jan 11, 2010 05:26 AM
Indenting left margin without a left sidebar showing rhymes Sidebars & Widgets 0 Apr 28, 2009 09:02 PM


All times are GMT -6. The time now is 08:54 AM.


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