Posts are the core of WordPress. They store content, are categorized, and are expansible with meta. Posts are grouped by post type, and within their post type by taxonomy (though a taxonomy can span more than one post type).

learn more… | top users | synonyms (2)

0
votes
2answers
2k views

Removing any and all inline styles from the_content()

For one of my current projects, I had to transfer blogposts from an old Wordpress site to my project. Things went smoothly until I've seen that all the posts were copy pasted from Word, leaving this ...
0
votes
1answer
236 views

How to rate a post from Admin Side / Manually?

I am working on a Mini Job Site. i want to give rating to posts manually from admin / editor side Best rated people will be on top. so visitor'll get better choice. visitor are not allowed to ...
0
votes
1answer
506 views

sort posts by getPostViews in functions.php

I have the following function in functions.php that allows sorting alphabetically or by recency. I want to change the alphabetic to sort by most viewed. This is the code I have for the sorter, which ...
0
votes
1answer
705 views

Remove Posts Quick Edit link for specific user role? WP 3.3

I am using Wordpress 3.3.2 with the following plugin: - http://wordpress.org/extend/plugins/advanced-access-manager/ The plugin works perfectly but the author said there is currently no way to ...
0
votes
1answer
453 views

meta_box or custom_field as a second tinymce post-instance?

probably a rather weird question but I have no idea if this is possible or not!? I created a custom-post-type to handle events. An event always has a future date but once this date is over I want to ...
0
votes
1answer
143 views

When viewing single parent post, display list of children

I have a Custom Post Type called glossary. I set up parent posts called "A", "B", etc. The glossary terms themselves are then set with the appropriate initial as their parent post. So, for example, ...
0
votes
2answers
505 views

automatically create taxonomy with same name as post title

I have a custom post type called "Country Story". The title of which will be the name of the country. I want Wordpress to automatically create a new taxonomy called "country" of the same name, i.e. a ...
0
votes
2answers
1k views

Remove All, Published and Trashed Post Views in Custom Post Type

I want to remove the below text links in Edit Post screen: All (8) | Published (5) | Draft (1) | Pending (2) | Trash (2) After searching, i found that this can be done by this code here, but sadly ...
5
votes
1answer
2k views

How Do I Use The Wordpress Plugin Posts 2 Posts by Scribu?

I have a Wordpress site that relies on relationships quite heavily. It's a record label website where artists can be related to tours, reviews, album releases and store items throughout the site. I ...
5
votes
2answers
3k views

How to add a “last” class to the last post in loop.php?

I need to add a "last" class to the last post that appears in loop.php. Can someone tell me how to accomplish this?
4
votes
3answers
377 views

Add tag to post api wordpress

I have been googling around but could not find the "add tag to post" api/codex. Does anyone know what it is ? Also, the "delete tag from post". Thanks.
4
votes
2answers
518 views

Category checkbox list tree changes when editing a post

I'm setting up the categories for my website and I have them like so: That's it, I have children of the same name but they are not interchangeable. If that bugs you just think that they have ...
4
votes
1answer
1k views

Getting the Next and Previous Posts Titles in the Sidebar?

Let's assume that I have the following posts with the following titles: PostA (is assigned to the 'category 1') PostX (category 2) PostB (category 1) PostC (category 1) PostD (category 1) PostY ...
3
votes
1answer
101 views

Get names of authors who have edited a post

How can I call the usernames of people that have edited a post? I know I can use get_the_modified_time to display the time the post was last modified, is the same possible with the list of users that ...
3
votes
1answer
659 views

Querying post from a multisite network

I am working on a multisite blog network where I have to display recent post on my home page, 10 post per page navigation. I did implement it using wpdb object with one complex sql statement. I got ...
3
votes
5answers
13k views

How to get all posts related to particular category name?

I am developing one project and in this project i have to display all the posts related to particular category name. I have searched a lot but i haven't got any idea to implement this. How can i do ...
3
votes
2answers
1k views

How to get Images included in Post

is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the ...
2
votes
1answer
165 views

Some posts returning 404 instead of displaying post

I'm having a problem with my Wordpress install. All of a sudden some of my posts return 404 errors when I try to go to their permalink. My post names are all numbers and this started happening when my ...
2
votes
1answer
87 views

How to display links in specific page

I have following links in content.php and i want to display in specific page with condition. Any ideas or suggestions? Thanks. Home Director’s speech Projects ...
2
votes
1answer
6k views

get all posts ID from a category

Problem: I need to get an array of ID's of posts from a given category If the category have any posts. This is to be used on a plugin options page. So far I have: $posts = ...
2
votes
1answer
267 views

How do I change the gallery that is inserted in the post?

When I insert a gallery to a blog post using the [gallery] shortcode or simply the insert media button I get a default structured gallery in my blog through the_content(); However the gallery comes ...
2
votes
1answer
1k views

HTML code in Custom field

I'm using a custom field to display images in a slider on each post, but when I update the post after having entered the HTML code in the custom field, the code disappears. I'm assuming that there is ...
2
votes
2answers
292 views

Create new category upon save based on post information

After finding a couple of leads on how to do this, I'm coming up blank. What I am trying to accomplish is to add the post to a new category based on camera name. If the category doesn't exist, then to ...
2
votes
2answers
8k views

Setting Custom Sort Order of Posts within a Category

I've got this category setup that includes several posts. By design it's not a blog, but a staff listing. Currently all of the staff members have their own posts with the category. I'd like to be able ...
2
votes
1answer
408 views

How to get a nofication when post submitted

I was wondering is there a way to send the admin a notification (email or otherwise) whenever a user submits a post. Currently, I have to log into the admin section to see if there was anything ...
2
votes
4answers
2k views

Grid layout “last” class to every third item

Seems like a trivial problem but I can't get it to work. I need to add class="last" to every third post. Here is my code: <?php $count = 0; $my_query = new ...
2
votes
2answers
238 views

Allowing a user to write a post from another website?

The idea here is to have a site (any site) which somehow has the user's WordPress user-name and login (maybe as part of a sister site) to allow him to write a post on his own blog. The idea I have now ...
1
vote
2answers
48 views

Posts for next month

How would one get posts that are set to 'future' to display in a loop? I am trying to figure out how to get posts that are in the future months. So if we are in April I want to display posts for May. ...
1
vote
2answers
75 views

Change default screen option value for posts per page

I want to change the default screen option value for posts per page in the wp-admin area when listing posts in pending mode. The default value is set to 20. Changing the value directly in the Screen ...
1
vote
3answers
56 views

Specify number of posts in my 'tax_query'

I'm showing posts of the term 'football' belonging to the taxonomy 'section', and everything works perfectly but Where can I specify the number of posts I want to show? just like this: 'showposts' ...
1
vote
1answer
58 views

Only display a certain number of posts, dependent on how many posts there are available in a query

I am trying to write some code for a slider of posts, at the moment my code involves two WP_Querys, one inside the other, but I can't help feeling there may be a more efficient way of doing what I'm ...
1
vote
2answers
617 views

add action only on post publish - not update

I have action which adds meta field with value on post publish. Problem is that when I update post meta field is reset to default value. I already tried 'new_to_publish' instead of 'publish_post' ...
1
vote
2answers
50 views

is there a better way of combining this?

Hoping someone can point me in the direction of writing this in a more succinct way. I'm working on my website, and want to display a total of 5 posts from the category 'general wonderings'. The ...
1
vote
1answer
68 views

Show posts in category x and y from the 6th most recent post onwards

I'm struggling with the query for this in WordPress to display posts in a category from the 6th most recent onwards. Basically, I have a top 5 posts section at the top of a category for featured ...
1
vote
1answer
203 views

Get the author of the latest revision

I would like to display the author (username) of the latest revision of a post from inside the loop. I tried get_the_author(), which echoes the username and $post->post_author(), which returns the ...
1
vote
1answer
863 views

Show a list of recently viewed posts to a user

I have a lot of video posts on my site and I'm looking to show the user a list of posts they've recently viewed. I'm guessing the best route is to just add the post id to an array in their usermeta ...
1
vote
1answer
733 views

Change slug with custom field

I want to change the slug of a post with a custom field. In example, if the custom field is "keyword" my post link will become: mysite.com/keyword. If the custom field is empty, i want to generate a ...
1
vote
2answers
2k views

Custom Blog Post Page

I found this example here of creating a custom blog post page: http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-homepage-in-wordpress/ 1) I created a blog page under Pages > Add New 2) ...
1
vote
1answer
413 views

Is There A WordPress Plugin That Produces PDFs of Posts Locally?

Most of the WordPress PDF plugins out there use services like Joliprint and Print Friendly to convert posts to PDFs. Is there a plugin that does this locally utilizing the power of PHP (and/or ...
1
vote
1answer
278 views

How do I write this SQL statement for Posts written in last 24 hours?

Someone gave me this SQL code to count the number of posts (of post_type 'mixtapes') in the last 7 days. I tried to convert it to 'in the last 24 hours' as well, but it's giving the wrong number. ...
1
vote
1answer
625 views

Open Wordpress 'Add New Post' admin page with parameters set via $_GET

I want to launch my web browser from an automation tool I use and open Wordpress "Add Nwe Post" page in the admin area with specific title and content (it varies everytime, I generate it dynamically ...
1
vote
1answer
910 views

Wordpress Delete hook with wp_delete_post function?

I have this action/hook: add_action( 'before_delete_post', 'my_delete_function' ); function my_delete_function($post_id) { global $wpdb; $achievement = get_the_category($post_id); $h = ...
1
vote
2answers
2k views

Verify if tag is used on posts

I'm using site tags for a glossary. I would like to display a link to the tagged page if the tag exists, otherwise just display the tag title. Is there a check which would allow me to determine if the ...
1
vote
2answers
2k views

Delete Post Link to delete post, its meta and attachments

I used // Delete Post Link function wp_delete_post_link($link = 'Delete This', $before = '', $after = '', $title="Move this item to the Trash", $cssClass="") { global $post; if ( ...
1
vote
1answer
311 views

[Plugin: Posts 2 Posts] Changing display order of connections

Can I change the order in which connections are displayed ? If I create say three connections and then display them at the bottom of my article, I will get them in reverse order. How can I change ...
1
vote
3answers
470 views

“more” tag doesn't appear when browsing category achives or search

Almost finished my website, but ran into one problem: When you view the archive of a category or do a search, the "more" (or "continue reading") link/ tag doesn't appear. It words fine on the ...
1
vote
1answer
361 views

Enable comments for post with comments meta box removed

I have created a custom post type in a plugin for a site I'm working on. I'm allowing users assigned a custom role to add/edit/delete the custom post type. I would like to give these users as little ...
1
vote
1answer
1k views

How to use WP default post list tables in a plugin?

I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same ...
1
vote
1answer
922 views

Get post ID outside of the loop

I am trying to accomplish something somewhat simple I think. I have a menu item at the top of my page that I want to link to the latest post in a certain category. I just need to get the post ID of ...
1
vote
2answers
4k views

Template file for static posts page does not get loaded?

I have this inside my posts page (set in the admin panel: Posts Page: Blog): blog.php <?php /** * Template Name: Blog * @package WordPress * @subpackage Prominent * ...