WordPress Queue like Tumblr?

The Time Release plugin comes close, but has a fixed update period. The functionality is there, though, and I’d guess the portion of code that does the checking/updating could be hacked to use whatever (still-fixed) frequency you want without too much trouble. EDIT 2.16.12 Found a couple others that come much closer to Tumblr’s behavior … Read more

The hook for the AJAX Add to Cart button?

Digging through the code, it’s pretty straight-forward to find. First, look at the template used for product archives – /templates/archive-product.php. Among other things, it sets up the regular queries and begins building the markup of the page. But when it actually starts looping through each product, it delegates the work to /templates/loop-shop.php. This template is … Read more

Display Random Author with Details in Sidebar

Your best option is to get a random post author which is a user ID so here is a function to do just that: function get_random_author_wpa91320(){ global $wpdb; $id = $wpdb->get_var(” SELECT post_author FROM $wpdb->posts WHERE post_type=”post” AND post_status=”publish” ORDER BY RAND() LIMIT 1 “); return $id; } And once you have that function in … Read more

has_archive=false on the default post type

Late answer. has_archive applies only for the rewrite arguments. In Detail If has_archive is set to true, then the $archive_slug will get set to the rewrite[‘slug’] argument. If then a rewrite[‘with_front’] arg is set, then this one will get prepended. The result of this will then get added as rewrite rule: add_rewrite_rule( “{$archive_slug}/?$”, “index.php?post_type=$post_type”, ‘top’ … Read more

Remove post title input from edit page

You can do this : add_action(‘admin_init’, ‘wpse_110427_hide_title’); function wpse_110427_hide_title() { if (current_user_can(‘subscriber’)) remove_post_type_support(‘post’, ‘title’); } This would hide title for subscriber. Replace ‘post’ with your custom post type

Display post number not post ID number

Post ID’s aren’t meant to be sequential. To number your posts sequentially, you’d have to use a meta field. There was discussion of this while back on this question: Change Permalinks Structure to a Sequential Number for Each Post? And the best answer for what you’re looking to do seemed to be a snippet of … Read more

Set tags for a post – without tag creation

OK, so you have something like this: $new_tags = array( ‘tag1’, ‘tag2’, ‘tag3’ ); wp_set_post_tags( $post_ID, $new_tags ); If you want to add only tags that already exist, then you have to filter your tags array: $new_tags = array( ‘tag1’, ‘tag2’, ‘tag3’ ); $existing_tags = array(); foreach ( $new_tags as $t ) { if ( … Read more

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