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)

2
votes
4answers
2k views

Change existing label in the admin bar with something else

In the admin bar an admin can create a new post by using the add new drop down. In there I want to change the label Post to something else. How can I do this? I just need the code to make the change ...
2
votes
2answers
2k views

How to add option box in “Edit Post” plugin API?

This might be kind of simple, but I couldn't find a way to do so in the WP docs. My plugin currently uses custom fields for things I could just have radio buttons/check boxes for each post. How do I ...
2
votes
2answers
2k views

How do I create a featured post within a custom post type?

Do I do this exactly the same way as I would with normal posts? I use a $featured_cat global variable and pull that out. Should I do the same here? Or should I use an associated custom taxonomy? Or ...
1
vote
2answers
2k views

Set posts of a custom post type to be private by default?

Say I created a custom post type called 'Private Posts' ($post_type = itsme_private_posts) and want all posts under the custom post type to be set to 'Private' automatically when published i.e. by ...
1
vote
2answers
1k views

Delete posts from a post type automatically via Cron

how can I use Cron to delete posts of a certain post type once they reach a certain limit, like keep maximum 50 posts? The reason is that these posts are being imported automatically periodically, so ...
1
vote
2answers
2k views

Group Posts by First Letter of Title

I am working on a website that is using posts as a way to manage glossary articles similar to the example website below. I would like to find a way to display articles alphabetically and grouped by a ...
1
vote
1answer
4k views

display all posts in wordpress admin

Is there any reason why Wordpress restricts the amount of posts you can administer at once to 20? Is there a way to display all posts? I want to change the category for about 1800 posts. I don't ...
1
vote
2answers
5k views

How to remove a column from the Posts page

In a previous question I asked how to add a column to the Posts page in the Administration section, and got a working answer. But now I need to know how to delete an existing column (e.g. the Date ...
0
votes
1answer
4k views

Open WordPress Posts in Bootstrap Modal

I am looking for some assistance in opening WordPress posts in the Bootstrap Modal. Right now I have a home page with a grid that pull posts. I have it setup so that each post is in a square box and ...
0
votes
2answers
1k views

Do action on publish or update?

Is there a way to only do a section of code on a template if the post has just been published or updated? What do I need to wrap around that code? UPDATE: I need to check if any of my custom-post ...
6
votes
2answers
701 views

How to prevent a post from being deleted?

For auditing issue, I only want a post can be trashed, but not deleted - for all users. So I have a plugin like add_action('before_delete_post', function($id) { wp_die(0); }); But ...
5
votes
1answer
2k views

Delete the original big size image after upload and leave only 3 images crunched by media gallery

I need to know is it possible to somehow erase the original image uploaded via Gravity form : post image - post field?! With the situation now I receive 4 images. 1 original (can be whatever user has ...
4
votes
1answer
59 views

How to put last edited entry on top of the blog-post list?

In the list of my blog posts, the "last published" entry is on top. I'd like to view the "last edited" entry on top of that list. I couldn't find a setting for that, so how can I realize it?
4
votes
1answer
384 views

Help! Turn php link data into url OR hide edit link in post admin OR hide drafts for all users except admin?

My website allows users to upload events via an upload process incorporated into a customised front end page. As an event uploader, I also want users to have access to the dashboard where they can ...
2
votes
2answers
430 views

Different permalink for posts and authors

I tried to avoid ask this question, because I think that must be simple, but after long hours trying to get an answer I cant achieve it. I am trying to get a permalink structure like this: ...
2
votes
2answers
897 views

Disallow Same Post Title

I am looking for some code where member can't use the same title as another post already having or used. e.g if there is a post with title "Amazing Australia Tour" than it should not allow to use the ...
2
votes
1answer
1k views

Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy

Let me explain the problem I am dealing with: I have 2 custom taxonomies. One is named "thestate" and the other one is named "thetown". In "thestate" I have listed all the states in the U.S. In ...
2
votes
3answers
367 views

Must permalinks always point to single post pages?

Suppose that I have a blog with few posts per month, and no comments, and I don't want to show posts in single post pages, but always "in context" (say, together with the posts in its month - or ...
2
votes
2answers
2k views

How can I edit a post from the frontend?

I have learned how to create a post from the frontend but how about editing it ? This is the code I am trying to create a simple frontend form for posting. Thank you
2
votes
3answers
914 views

Automatically create pages in a post based on number of words

I need a method to automatically create pages (using <!--nextpage-->) in posts based on number of words. For example... A post containing 1200 words should be broken down into 6 pages with ...
2
votes
4answers
2k views

Get Next / Prev 3 Posts in Relation to Current Post

I have 7 posts, like this: 1 2 3 4 - this is the current post 5 6 7 As noted, number four is the current post being displayed. I need to create a query that will allow me to display the previous 3 ...
2
votes
1answer
574 views

blog posts sorting doesnt work while using get_query_var

I'm trying to show the latest posts using the get_query_var function. The function filters the posts according to their category. When I'm displaying the posts on the page they appear unsorted ...
1
vote
1answer
1k views

Custom Post Type Pagination Doesn't Work in Wordpress 3.4

I have a problem when using Wordpress 3.4. My "Products" custom post type pagination doesn't work. Here is the code I use $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $loop = new ...
1
vote
1answer
640 views

duplicate posts when trying to update a post using the wp_insert_post.

On an empty wordpress database, I insert one sample post using the wp_insert_post. Since it's an empty database, the first post I add ends up with id 1. And I check that in the wp_posts, everything ...
1
vote
1answer
702 views

How to avoid duplicate posts on front page?

how to avoid duplicate posts on front page? i have 1 category 'news' for all posts and some categories like 'vegetables' and 'fruits'. Each post is in 'news' and particular category. At the top of ...
1
vote
2answers
10k views

how to display post content without post image?

i've implemented a jQuery gallery for displaying several images within a post. the problem is that the_content(); also displays the post image. any ideas how to filter it? thanks
0
votes
2answers
301 views

Set font size automatically according to number of words in post

By submitting a post for publication will be made a count of the number of words in the post and will add a div with font-size pre-set according to the number of words. If the post contains up to 50 ...
0
votes
1answer
792 views

VT-resize image and display it [duplicate]

Possible Duplicate: Retrieve 1st image in post and set it as featured image, when post is saved/updated I am trying to make this works and instead of giving me the url of the image, it is ...
0
votes
1answer
640 views

Custom permalinks - post type - hierarchical taxonomy's

I did folowed the steps / solution from Jeff it helped me alot with he's settings, got it for about 90% working properly. But getting stuck on the post / postname. It loads now the ...
0
votes
4answers
4k views

Prevent duplicate posts in wp_insert_post using custom fields

My source links are something linke this : http://sample.com/entertainment/default.aspx?tabid=2305&conid=102950 http://sample.com/entertainment/default.aspx?tabid=2418&conid=104330 ...
0
votes
1answer
327 views

Crossposting from WP to Blogger with comments

I know that there is a way to crosspost from WP to Blogger but I am curious if there is a way to essentially mirror WP blog on Blogger completely, in other words crosspost both posts and comments?
5
votes
3answers
763 views

How can I make it so the Add New Post page has Visibility set to Private by default?

I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: Status: Draft Visibility: **Private** Publish immediately [Publish] ...as opposed ...
3
votes
2answers
355 views

count number of posts (public , private , protected) by category name

I wanted to count number of posts (public, private, protected) according to a category name suppose blog . To get all the posts no matter what category i used $total_pages = ...
3
votes
2answers
986 views

how to automatically generate random slug

I have tried to create a function that generate a random slug when a post is created. I am a bit worried that the function generates non unique strings as slugs. How can I solve this? The function ...
2
votes
1answer
209 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
2answers
317 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 ...
1
vote
3answers
89 views

Static posts page with home.php

For my website, I am using a static home page page Home (template front-page.php) and for posts- page News (template home.php) I need to show all the post titles and exceprts on that page News ...
1
vote
2answers
304 views

Adding default post content for category

I'm trying to add some default content to my posts using this code in my functions.php: add_filter( 'default_content', 'my_editor_content' ); function my_editor_content( $content ) { $content = "My ...
1
vote
1answer
362 views

Setting pagination for images attached to a post

I am trying to figure out how to paginate a post for it's images. I have a custom post type set up to act like a gallery - images only. And would like to paginate the images. I am having a hard time ...
1
vote
2answers
643 views

How can I get a list of latest posts outside of my WP install?

I have a site with WP installed at /blog, and I'd like to just get a list of the latest blog posts to display on the site home page... that is to say, my custom (PHP) home page, NOT a Wordpress page. ...
1
vote
4answers
1k views

Wordpress Posts Out Of Order after 3.1 Update

The first posts I wrote are now showing on the homepage. After Googling, the problem is because I am using query_posts to exclude a certain category on the main loop. <?php ...
0
votes
2answers
382 views

Share buttons on article footer

for a website I need to place facebook and twitter share buttons on the footer section of each article on the blog page (where are listed all the articles). I tested many social plugin and was able ...
0
votes
2answers
275 views

How to lock content?

What is the easiest method to make all my articles accessible only to registered users? My homepage contains titles and excerpts but I want to allow access to the full content only to registered ...
0
votes
1answer
50 views

Problem with quotes

I have a strange problem with the latest version of Wordpress: Some writers, when they write a story, you see the quote character ', replaced with /, something that does not happen to me. Is there any ...
0
votes
4answers
4k views

Multiple loops in same page, without duplicate content

I'm trying to make a page with multiple loops, I need every loop to display a predefined number of posts from the same category (every loop displays X number of posts from Category CATS). But I also ...
0
votes
1answer
209 views

Adjust the order for returned posts

I have written a neat responsive slider for my Wordpress featured articles (feel free to use it): <?php $responsive = 'on' != get_option('henrik_responsive_layout') ? false : true; ...
0
votes
2answers
1k views

$post->ID not working

I have the following code and while get_the_ID() works, $post->ID does not, why? $the_query = new WP_Query( array( 'post_type' => 'custompost', ) ); while ( ...
0
votes
1answer
46 views

featuring old articles without messing up with the archive

This is all about featuring content in WP. Say, you got 1000's of posts that you accumulated over the years and each has their own original ( and true ) post dates. And now you want to feature them ...
0
votes
1answer
238 views

Post X of Y in single.php / sidebar.php

Is there a way of putting "Post X of Y" into my sidebar? I think I can only show it when it is a single blog post (something like checking if the content is_single) but I want to be able to see which ...
0
votes
3answers
161 views

Calling Permalinks With PHP

I'm developing a theme which supports WordPress' post formats. As a result I am using a big if statement, which can be found below. I would like to link my post titles to the posts while ...