nathanmaxsonadil Posted December 20, 2007 Share Posted December 20, 2007 Hi there, I was wondering what am I doing wrong here? when I go to my site the div is completely empty if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<div id="'.cor().'"><ul><li>', 'after_widget' => '</ul></li></ul><br/></div>', 'before_title' => '<div class="submenu"><div class="submenu_line1">', 'after_title' => '</div></div><ul class="list-cat">', )); Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 20, 2007 Share Posted December 20, 2007 You're not printing out those strings anywhere, just setting the variables. Show us more of the relevant code, we don't know what register_sidebar does. Quote Link to comment Share on other sites More sharing options...
nathanmaxsonadil Posted December 20, 2007 Author Share Posted December 20, 2007 this is in my functions file in wordpress http://automattic.com/code/widgets/themes/ here's the code for my function cor() $num = "category_"; $num1 = "category_"; $num2 = "category"; function cor() { if ($num == $num1){ $num = $num2; }ELSE{ $num = $num1; } echo $num; } Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 20, 2007 Share Posted December 20, 2007 Your reply makes no sense. If you're working in Wordpress this might do better in third-party scripts. if register_sidebar is a wordpress function. Quote Link to comment Share on other sites More sharing options...
nathanmaxsonadil Posted December 20, 2007 Author Share Posted December 20, 2007 register sidebar is not the problem the question was how to make cor() appear in the array? Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 20, 2007 Share Posted December 20, 2007 cor doesn't return a value, it echos it. Change echo to return. Quote Link to comment Share on other sites More sharing options...
trq Posted December 20, 2007 Share Posted December 20, 2007 he question was how to make cor() appear in the array You didn't ask a question. You simply posted some statements. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.