How to list “invisible” Auto Drafts?

try pasting this in your theme’s functions.php file add_filter( ‘parse_query’, ‘display_autosave_and_revisions’ ); function display_autosave_and_revisions( $query ) { global $pagenow,$typenow; if ( is_admin() && $pagenow == ‘edit.php’ && $typenow == “post”) { $query->query_vars[‘post_type’] = array(‘revision’,’post’); $query->query_vars[‘post_status’] = ‘any’; } }

Listing wordpress users with a search function

This worked for me. $user_query = new WP_User_Query( array( ‘search’ => ‘*example.net*’, ‘search_columns’ => array(‘user_url’) )); $authors = $user_query->get_results(); The wild card to be used in the search string is ‘*’ and not ‘%’. Also you have to include the ‘search_columns’ parameter with the following possible values search_columns = array( ‘user_nicename’, ‘user_login’, ‘user_email’, ‘user_url’ ) … Read more

How to create custom post listing in the admin?

This trick should help you… <?php add_action(‘pre_get_posts’, ‘filter_posts_list’); function filter_posts_list($query) { //$pagenow holds the name of the current page being viewed global $pagenow; $post_type = $query->get(‘post_type’); //Check the post type and whether its the list page, then set the taxonomy if($post_type == ‘my_cpt’ && ‘edit.php’ == $pagenow) { //global $query’s set() method for setting the … Read more

Category Thumbnail Display – How to display ONLY the main Category

Ideally, place this in a plugin (so it’s not overwritten when you update the theme): function wpse_106185_elist_categories( $args ) { return $args + array( ‘depth’ => 1, ); } add_filter( ‘listing_categories_args’, ‘wpse_106185_elist_categories’ ); Alternatively, a quick fix is to edit this line… $elist_categories_args = array( ‘hide_empty’ => 0 ); To… $elist_categories_args = array( ‘hide_empty’ => … Read more

WordPress for a business catalog site

Is WordPress a right choice for my requirements? Is it only for blogging or can be used for any kind of site? (corporate, portfolio, catalog, personal info etc.) WordPress can absolutely be used for any kind of site. But note that while things like post and pages are ready out of the box and simple … Read more

WordPress product catalog site [closed]

What is a good start point to study? Read a few tutorials on Custom Post Types and Custom Taxonomies. Here´s a good one to get started. What plugins do I need to install? It wouldn´t be too difficult to create the site structure without any plugins. Do I need to install wp-ecommerce plugin? Based on … Read more

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