Unique widget id in sidebar

No offense, but your code is a COMPLETE mess, so I’m just going to give you clean code and then tell you how to target it. register_sidebar( array( ‘name’ => ‘Post Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget widget-%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<div class=”titlediv”>’, ‘after_title’ => ‘</div>’, ) ); Then to target the title … Read more

Post Thumbnails on Sidebar Widgets

There is no ability in the default widget, you will need to use third-party plugins to acheive your goal. Here are some that I have found. http://wordpress.org/extend/plugins/yd-recent-posts-widget/ http://wordpress.org/extend/plugins/get-recent-comments/

Alternative for is_taxonomy() to workaround theme’s default sidebar

The function that replaces is_taxonomy() is named taxonomy_exists(). Than there’s also is_tax() and is_tag() that check if the query is for a taxonomy archive page. EDIT $selected_sidebar_replacement == ‘0’ || $selected_sidebar_replacement == ” won’t work. You’re not checking the type. Better do it like this: if ( ! $selected_sidebar_replacement OR emtpy( $selected_sidebar_replacement ) )

Show different sidebar on taxonomy pages when a default is set

Why don’t you simply create a new sidebar… It will be clearer for you and will lighten your sidebar.php. Create a file in your theme folder : sidebar-thenameyouwant.php put your sidebar code there like this ex : <div id=”secondary”> <?php dynamic_sidebar( ‘sidebar-xyz’ ); ?> </div><!– #secondary .widget-area –> in your themes function.php… add : register_sidebar( … Read more

Single Widget Multi Sidebar

I figured it out after looking at wp_option tables for my widget and the sidebars_widget option I figured out that my widget name has to be none white space separated, in my case it should be anzima_posts_widgets, also I have to include the base-id in the control_ops parameter as the first index. Another issue I … Read more

List child terms and posts in the current term

ok, i don’t know how this looks but i’ve got exactly what i wanted. <?php $term = get_queried_object(); $tax = ‘ntp_package_type’; $parents = $term->parent; $term_id = $term->term_id; if($parents == 0 && !is_single()){ wp_list_categories( array ( ‘taxonomy’ => ‘ntp_package_type’, ‘pad_counts’=> 0, ‘title_li’ => ”, ‘child_of’ => $term_id, ) ); } elseif ($parents > 0 && is_tax($tax, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)