Articles of posts

Exclude posts from featuring

I’m trying to hide posts from a specific category from being featured. Currently, the section shows featured posts from all categories. I need to exclude posts from a category (with category name not by id). $args = array( ‘posts_per_page’ => 1, ‘meta_key’ => ‘meta-checkbox’, ‘meta_value’ => ‘yes’, ); $featured = new WP_Query( $args );

How to post twitter like updates on wordpress

Is there a plugin or a hack such that I can make short updates similar to twitter’s on my own wordpress blog? Perhaps making use of a custom post type or something on those lines? What i’m trying to achieve is to create short (150 character limit) posts different to the regular posts on the […]

Adding Plugin-specific Fields with wp_insert_post()?

(Moderator’s note: The original title was “wp_insert_post() and plugins“) I use wp_insert_post() like this: $my_post = array( ‘post_title’ => ‘title’, ‘post_content’ => $post, ‘post_status’ => ‘publish’, ‘post_author’ => 1, ‘post_date’ => date(‘Y-m-d H:i:s’, $oldtime), ‘post_category’ => array(3,4) ); wp_insert_post( $my_post ); Everything works fine, but I want to use plugins like “All in One SEO […]

How to change bulk post status

I have about 2300+ post in my blog is it possible to change status from publish to draft at a time? add_action(‘publish_post’, ‘check_publish_post’, 10, 2); function check_publish_post ($post_id, $post) { $query = array( ‘ID’ => $post_id, ‘post_status’ => ‘draft’, ); wp_update_post( $query, true ); }

Post Type Label Name

i’ve just created a new post type. It’s name is Academias so the first menu option is Academias as well. But I would like to change it to something like See All Academias (just an example), is that possible?

Add confirmation popup on “Move to Trash”

I want to open javascript message “Are you sure you want to move the post to trash?”when we clicks on “Move to Trash” link in Publish box. and when we click to OK the post go to trash or cancel to go back to the post. I found this code on previous question. It’s open […]

Change default Posts page

In my Admin Panel, I am constantly checking my Posts by state and visitor count via the All Posts link on the lefthand menu bar. My desired URL looks like: wp-admin/edit.php?post_status=publish&post_type=post&orderby=post_views&order=desc But the default for this link is just wp-admin/edit.php How can I make it so that the default link for my Posts is like […]

Counting words in a post

How can I count words in a post? Something like the one displayed just below the post? Can someone please show me the code for getting this. I have been searching everywhere.

Post update RSS notification plugin

Whenever I update an older blog post with new information then it is visible to all readers that visit the site itself. Readers of the RSS feed don’t get the update and miss the new information. I am looking for a way which issues back the post to the RSS-feed as if it was a […]

Check if post has children or not

I need some code to know if the post has another pages or not unfortunately i didn’t find yet now any reference for this so any idea will be appreciated What I need to acheive is if has child //some staff else: // another staff now I am using $args = array( ‘post_parent’ => get_the_ID(), […]