Drop down list code for sidebar

Well, in a “layman’s” terms, you need to add your preferred filter (specific category id and order) to the $args array, like so: $args = array( ‘numberposts’ => ‘5’, ‘post_status’ => ‘publish’, ‘cat’ => 5, ‘order’ => ‘ASC’, ‘orderby’ => ‘title’ ); The ‘cat’ should be the id of the “specific” category you want to … Read more

How to add custom option to wp_dropdown_categories?

You can do like this add_filter( ‘wp_dropdown_cats’, ‘add_yet_another_option’, 10, 2 ); function add_yet_another_option( $output, $r ){ $output = str_replace( ‘</select>’,”,$output ); // remove closing select tag $output .= ‘<option class=”level-0″ value=”some-value”> Some Custom Options </option>’; // custom option. $output .= ‘</select>’; // add closing select tag return $output; } But why would someone put custom … Read more

Unregistered taxonomy apears still as emtpy filter list

After I little digging I found the right action in the parent theme. The function looked like that (actually exactly the example I linked above): ////////////////////////////// // Add page category filter // ////////////////////////////// add_action(‘restrict_manage_posts’, ‘uncode_page_filter_post_type_by_taxonomy’); function uncode_page_filter_post_type_by_taxonomy() { global $typenow; $post_type=”page”; // change to your post type $taxonomy = ‘page_category’; // change to your taxonomy … Read more

Show all authors in drop down panel while choosing author for a post

The author dropdown in the post editor is generated by the function post_author_meta_box() That particular function uses the wp_dropdown_users() function to display the dropdown. The problem is that the arguments specified for the instance do not include the “show_option_all” argument. That argument should default to “all” but if you’ve got a filter on wp_dropdown_users_args somewhere … Read more

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