Hello all., actually i'm new to digging into wordpress themes and wondering if i can create a new position on wordpress theme to place a widget. is this a kind of hacking? is there any plugin available to do this visually or do i need to know php? thanks guys
just place this code in your theme right in the place you want to add the widget <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('customwidget') ) : ?> <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> <?php endif; ?> Code (markup): and add this to your functions.php <?php if (function_exists("register_sidebar")) { register_sidebar(Array("name" => "customwidget")); } ?> Code (markup): and do css styling to decorate it
not successful.. let me confirm it whether what i did was right adding this to functions.phh adding this on the footer.php after doing this i got some error... sorry i'm not into scripts stuff, so please help., thanks guys
lol sorry buddy but you got wrong, the 1st code put on the place where you want the widget show, and the 2nd code to the functions.php, you did wrong..
no, for example you want to show widget on footer, add the 1st code in the footer and the 2nd code in the functions.php
ok, so the first code goes to footer.php right? sorry if i'm outside the track. as i said earlier i'm new to php stuffs and cracking wordpress :0 thanks for being so patience
exactly followed the steps and got this error This one on main functions.php file Parse error: syntax error, unexpected '{' in /home/success/public_html/testdir/2/wp-content/themes/aaanr_morning_v1.0.5/functions.php on line 41 and i was suggested to edit functions file inside the user folder and got this Parse error: syntax error, unexpected '{' in /home/success/public_html/testdir/2/wp-content/themes/aaanr_morning_v1.0.5/functions/user/functions.php on line 1
sorry guys i sorted out.. the problem was <?phpif (function_exists("register_sidebar")) { register_sidebar(Array("name" => "customwidget")); } ?> I just copied and pasted this code., later only i checked this error <?phpif i can see custom widget now. great help bowodesign