[SOLVED] Create a new Widget in Header Area only in Homepage
Hello,
I'm new here,I would be happy your help. I want to create a new Widget in Header Area, how can I do it will be available only on the homepage? Here is my code: <?php bfa_widget_area('name= slider&cells=2&align=1&align_2=8&align_3=8&width_2 =733&before_widget=<div id="%1$s" class="slider-widget %2$s">&after_widget=</div>'); ?> Thank you. |
the easiest way would be to put in two CSS statements,
HTML Code:
#idofyourwidgetarea {display: none;} |
Thank you Juggledad,
But the code does not work. May be I did something wrong? |
did you use the actual ID of your widget area or did you use '#idofyourwidgetarea'?
|
I wrote it this way:
# slider {display: none;} body.front-page # slider {display: block;} It does not work and it's probably incorrect, right? What does "id widget" mean? Where can I find it? |
It looks to me like you are unfamiliar with CSS. I would suggest you take a CSS tutorial like this one so you have a basic idea of the syntax and how to use it if you want to make changes like this, to the theme.
|
I know a little CSS, I read the Tutorial. Thanks
I changed the code, but now the widget not found at all. I need it to appear only on the home page. What did I do incorrect again? :( #divslider {display: none;} body.front-page #divslider {display: block;} |
if you code #divsLider' that means you have an HTML element that has an ID of 'divslider' assigned to it.
Is 'divslider' the name of the ID? |
I think so, here is my code:
<div id="divslider"><div><table id="tableslider"> <?php bfa_widget_area('name= slider&cells=2&align=1&align_2=8&align_3=8&width_2 =733&before_widget=<div id="%1$s" class="slider-widget %2$s">&after_widget=</div>'); ?> The code works, just not true. He dismisses the widget in all pages, and I need the widget stay in home page. So what is wrong with it? |
What is the URL?
|
Thanks, the Url
|
try this
HTML Code:
#divslider {display: none;} |
Thanks, it works. :)
Donation was transferred directly to you. |
All times are GMT -6. The time now is 10:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.