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)

1
vote
1answer
257 views

Post & edit a post from front end along with upload, dropdown, and other inputs

I am following this tutorial to post from front end. I am able to post the title, content, category, tags, I would like to know is it possible to add more fields like in the image below. How to ...
1
vote
1answer
398 views

Multi-site: removing /blog from posts

I'm deploying a multi-site network, using subfolders. I've found on the main site the permalinks for news posts can only be placed like so: /blog/%year%/%monthnum%/%postname%/ I understand that ...
1
vote
1answer
338 views

Set Expiration Date of a Post from the Frontend with wp_insert_post

i try to build a form that users posts from frontend, everything works fine but i need to know if it's possible, if i play with the 'post_date' => date('Y-m-d H:i:s')? if i add a hidden field that ...
1
vote
1answer
758 views

Retrieving and Storing Images Linked from Other Domains on Local Server?

(Moderator's note: The original title was "Copy and Paste picture in post without linking to original") When I copy and paste a picture from another editor window it appears nicely but it links to ...
0
votes
1answer
177 views

Wordpress post carousel

I stuck with this. I would like to have a portfolio carousel, that shows 9 of the latest posts in the carousel, and when you click on an arrow, than you will the 9 older posts etc. How can I get this ...
0
votes
3answers
797 views

how to get a different html for odd/even posts?

query posts if posts exist then begin the loop if post is even: <h1>title</h1><p>content</p> if post is odd: <div>its ...
0
votes
1answer
74 views

How to let custom post type posts show in standard post archive (like in homepage)?

If I, for example, create a custom post type named 'tutorial', how do I get it to also show up in places like "Recent posts" , etc?
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
248 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
527 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
732 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
459 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
146 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
516 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
398 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
557 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
105 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
707 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
2answers
4k views

Stop WordPress automatically adding <br> tags to post content

Is there a way to stop WordPress from automatically inserting <br> tags when adding returns in the WordPress text editor. I would like for it to behave more like a code editor where I can ...
2
votes
2answers
742 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' ...
2
votes
1answer
179 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
276 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
298 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
9k 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
418 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
2answers
175 views

Single Post Navigation Within Each Category

I have about 10 different category posts etc. As you know, withing each category there is the next and previous navigation to toggle between posts. When you reach the Last post in a category, the ...
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
1answer
28 views

Rewriting WordPress core functionallity: Changing the private posts

I'm trying to rewrite a bit of core WordPress functionality. I'm using WordPress 3.9.2 and I consider myself an intermediate in WordPress programming. This is an image that will explain what I am ...
1
vote
1answer
29 views

I'm having some issues with previous_post_link() and next_post_link()

I've been developing a Wordpress site lately and have come across an issue. I need the user to be able to navigate between posts, I'm using the standard Wordpress functions previous_post_link() and ...
1
vote
2answers
50 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
85 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
64 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
3answers
150 views

Problem excluding category from get_next_post

I have a custom post type called "exhibitions" that uses the native "category" taxonomy. I have three categories: Current, Past, and Featured. Posts get marked either Current or Past and some are also ...
1
vote
1answer
62 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
3answers
547 views

Divide Post content into separate divs for every 500 characters (or any other character counts)

What is the best method for intercepting the_content of a post (for a single post page) and dividing the_content into sections of 500 characters (or any other number of characters), and then ...
1
vote
2answers
52 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
70 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
210 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
905 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
769 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) ...