Widget’s container?

It’s the default behavior of a dynamic sidebar to output li tags around widgets. You can override that though in the sidebar declaration. You would do that by passing the sidebar registration the following additional arguments: register_sidebar( array( ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => “</div>” ) );

How to add search form in main page body?

I just wanted to add two small things for other peoples…. if your template supports it you can just add : <?php include (TEMPLATEPATH . ‘/searchform.php’); ?> 2.adding the following code will put a text inside the search box. (like “Write your search and hit Enter” ) <form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>/”> <div><input type=”text” … Read more

Check if post belongs to any category

get_the_terms return and error on failure. So before your foreach loop check for the error and only run it if there is none, using is_wp_error. <?php $myterms = get_the_terms( $post->ID, ‘portfolio_category’ ); if( !is_wp_error( $myterms ) ) foreach( $myterms as $myterm ) echo $myterm->slug . ‘<br />’; ?>

breadcrumb need to show all pages and subpages

That’s not traditionally how breadcrumb navigation works, as I’m guessing you’ve discovered if you’re trying to implement Breadcrumb NavXT. 🙂 You might have better luck styling wp_list_pages so the links display horizontally and highlight the page you’re on? Here’s where it describes how to display the current page / ancestors / children. Best of luck!

wordpress admin plugin menu custom css

Use the admin_head hook and just echo out what you need to: function my_admin_head() { // Custom Style echo ‘<link rel=”stylesheet” href=”‘.WP_PLUGIN_DIR.’/style.css” type=”text/css” />’; // Our JS echo ‘<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js”></script>’; } add_action(‘admin_head’, ‘my_admin_head’);