Fix warning: Missing argument

do_action( ‘after_setup_theme’ ); doesn’t pass any parameter. You are cutting something of the length 0 after theme setup. Why? Plus, your registration with add_action doesn’t tell WordPress that you want two parameters. The default is one parameter. You don’t need this call at all. If you define the function in your functions.php it will be … Read more

create function to call category name and slug

You don’t need to hook the dw_get_category() function. Simply do it like this: function dw_get_category() { global $post; $categories = get_the_category($post->ID); if ( $categories ) { foreach ($categories as $category) { $dw_category_slug = $category->slug; $dw_category_name = $category->name; } } else { $dw_category_slug = ‘utopia’; } $dw_category = array(‘name’ => $dw_category_name, ‘slug’ => $dw_category_slug); return $dw_category; … Read more

I cannot include a file in my plugin settings page

Most likely the file cannot be found, I’m assuming the file you’re trying to include is located in your theme folder, in that case you should use: require_once( TEMPLATEPATH . ‘/file.php’); TEMPLATEPATH will return something like this: /home/user/httdocs/wp-content/themes/twentyeleven. Worst case scenario you’ll find a Fatal Error, but that’ll help to find the problem.