nomis
Members
-
Joined
-
Last visited
Reputation Activity
-
nomis got a reaction from Milli05 in Hooking up Page and Category specific widget areaAh yes, multiple conditions. Now I remember all those (&& || !) doohickies. I had to remove the colon at the end of the first line, and it still won’t work if I include the endif, but without those it works just fine
I’m working in the functions file of a StudioPress Genesis template, and it says that I need to leave off closing delimiters at the end of files, so maybe that relates in some way to the endif problem.
Anyways up, it works great in the way shown below, so thank you soooooooooo much Milli.
P.S. I think I may be in love.
add_action( 'genesis_after_header', 'add_tuts_submenu' ); function add_tuts_submenu() { if (is_page('220') || is_category('15') || is_category('16') || is_category('17')) genesis_widget_area ('tuts-submenu', array ( 'before' => '<div class="wrap"><div class="tuts-submenu widget-area">', 'after' => '</div></div>', ) ); } -
nomis reacted to Milli05 in Hooking up Page and Category specific widget areaI think you could do it with one if statement:
if(is_page('59') || is_category('11') || is_category('12') || is_category('13')): genesis_widget_area ('blog-submenu', array ( 'before' => '<div class="wrap"><div class="blog-submenu widget-area">', 'after' => '</div></div>', ) ); endif; || means or .
As I can see you would like to place the same widget area if the page id is 59 or the category id is 11,12 os 13.