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
1answer
43 views

Wanting to apply different featured images for each post

This is my first wordpress website here and so far it'll looking good. The only thing I have left that I just can't figure out is the featured image for my blog page. I have set the main blog banner ...
0
votes
1answer
30 views

adding my posts (author posts) in menu

I want to add "my posts" to main menu. By clicking on this, each logged-in user will see his/her own posts. I don't know how the link structure should be to add on the menu.
4
votes
1answer
1k views

has_archive=false on the default post type

On the default post type, why does the has_archive property equals to FALSE? $type_obj = get_post_type_object('post'); var_dump($type_obj->has_archive); // FALSE
0
votes
1answer
241 views

Display Notification Bar on Header on Certain Post Count

I want to display notification bar on header in my Wordpress theme when user submit certain number of post. I want to notify my author once they are submit amount of post. e.g. if (authorpost === ...
3
votes
2answers
1k 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 ...
1
vote
1answer
771 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 ...
0
votes
2answers
310 views

How can I remove the first two words and shorten get_the_title()

Some of my posts' titles have leading words, followed by a colon. I am removing the leading words and the column of every post title in the loop with the following: <?php $title = ...
0
votes
1answer
1k views

How to separate each individual blog post?

Im trying to create a blog page that has each post separate with a border around each one. A good example I can think of would be http://blog.pagodabox.com/. How every post is divided into its own ...
5
votes
1answer
398 views

Code to make a post sticky

How is it possible to upgrade a post to make it sticky directly from code, not by admin area? Is it possible through a code like: update_post_meta($post_id, $meta_key, $meta_value, $prev_value); In ...
0
votes
2answers
947 views

Delete Child Posts

I'm trying to delete all child posts when the parent is deleted. The parent post deletes just fine, but the child posts are not properly deleting. Here's the code I have in place now: $args = ...
0
votes
2answers
188 views

Most visited posts

I need a plugin which shows the most visited posts. I ve looked all plugins, they are working fine but the results can manipulate with refreshing. Is there any plugin that shows unique weekly ...
1
vote
1answer
5k views

Limiting the number of posts in WP_Query leads to unexpected result

The following is supposed to display 10 posts. Sometimes it displays 11, sometimes 12, and sometimes the desired 10 posts. It behaves the same if I swap posts_per_page for showposts or numberposts . ...
2
votes
1answer
475 views

How can I get all posts data from within a paginated search result?

Let's say I'm doing a search on my site, and get 50 posts as a result. The pagination is set to 10 posts per page, so I have 5 pages of results. When I'm on the first page of results, if I inspect ...
0
votes
2answers
198 views

the_permalink() not working in a root installation

I hope someone can help me. I have a root installation of WP, but not as index.php (it's actually news.php). Consequently the_permalink() doesn't work, as the root of the website is a different page. ...
2
votes
2answers
332 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 ...
0
votes
1answer
59 views

Only show posts with image and the correct ammount of posts in loop

This script makes a loop showing only posts with images, but I have a problem. It doesnt show the right ammount of posts pr page. Probably because it counts the total nr of posts, including the ones ...
2
votes
2answers
802 views

posts page - different lengths of excerpt

is it possible to get wordpress on the posts page to do the following example. the first three posts need to have a large image spanning the width of the title box and a longer excerpt. the rest of ...
0
votes
2answers
52 views

Is codex right on deleting post?

The codex has this to say on wp_delete_post. When the post and page goes, everything that is tied to it is deleted also. This includes comments, post meta fields, and terms associated with ...
1
vote
1answer
251 views

Update a users role based on number of posts published

I am trying to update a users role based on number of posts published when the user publishes a new post. I have tried this code but it does not work. add_action('publish_post', ...
4
votes
1answer
1k views

Create posts on user registration

How can I create let say 3 posts after the user finish the registration ? The ideal outcome would be to create 3 posts using the user as the author of the posts and with some pre-defined values. ...
1
vote
2answers
87 views

Output HTML only on individual post view

I am looking for a way to output some html (javascript actually) on a post view only and not on a main page, tag, category view (where WP outputs several posts). E.g it would be output on this page ...
0
votes
1answer
2k views

WP_Query with custom post type ID

This code isn't echoing out anything, even though I'm 100% positive $mixtape_id is set to an integer which corresponds to one of the posts within the 'mixtapes' custom post type $query = new ...
0
votes
1answer
30 views

Edit part of a post

In some wikis (e.g., mediawiki), if you want to edit part of a page, you can either click an edit link that lets you edit the entire page -- or, if you just want to edit a single section of the page, ...
0
votes
1answer
276 views

Support for simultaneous editing

I'd like to allow multiple authors/editors to simultaneously edit a single page. Each author should immediately see any changes made by any other users concurrently editing the page (just like ...
1
vote
1answer
80 views

How to exclude visited posts from loop

How can I exclude visited posts from a loop? I have a loop of recent posts on a single post page that excludes the current post and I want to extend the amount of times users browse by filtering out ...
0
votes
1answer
318 views

blog page showing only first post

Live site. My blog page is showing only the very first published page, and not the subsequent posts. I've noticed, too, that when viewing the page source, the blog page seems to be using single.php ...
1
vote
1answer
383 views

Custom Post Type Rewrite To Include Parent Page(s)

I have a page title "more" with subpage "cities-guide". Said "cities guide" page has a loop that pulls in posts from custom post type "thailife_city_guide". My permalink structure is ...
2
votes
1answer
670 views

Wordpress - Admin Manage Posts - Multiple Filters by Parent Category

Lets say I have the following Categories in Wordpress: Product Category - Cat A - Cat B - Cat C Service Type - Service A - Service B - Service C On the Manage Posts page on the Admin side, I want ...
0
votes
2answers
524 views

WP text styles not coming through to actual post

So Long story short, im working on a custom theme and wrapping the WP hooks onto said theme etc and i noticed that, When writing a post/page etc, that say for example i want to make a word bold/italic ...
0
votes
1answer
758 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 ...
1
vote
1answer
88 views

Check to see if specific loop has less than certain amount of posts

I'm looking for a way to check how many posts are returned by a specific loop. So if I have a loop like this.. <?php $featured_post_id = get_the_ID(); global $post; $args = array('cat' => ...
0
votes
2answers
367 views

How to only publish posts with image in it

I use a standard loop in my index.php and that shows all the posts beeing posted. What i'm looking for is a code that only shows the posts that have image(s) in it. With other words: i only want to ...
0
votes
1answer
154 views

Making a wordpress page print friendly

I'm trying to use an existing plugin in order to make my posts print friendly. I haven't got any support from the plugin developer. I think I have narrowed down the script to the function that places ...
0
votes
2answers
467 views

Posts Page Featured Image [closed]

I have created a theme that uses a featured image on every page. In settings, I have setup my "Posts Page" to be "news"...how do I get the featured image from "news" to display? The following will ...
-1
votes
2answers
779 views

the_time() cannot be placed correctly

I want to use the following code the_time('d. F Y', '<p class="article-date">', '</p>'); to show the date of an article (post) wrapped within <p></p>. I also tried echo ...
0
votes
1answer
189 views

Is there a way to separate wordpress titles from their posts?

Basically I am coding my own theme, and I would like to have my titles listed on the left hand side, so that on clicking the title, the corresponding body opens up on the right. How can I list these ...
1
vote
1answer
329 views

How would one change the default url structure of attachments?

When I click on post images it redirects in a page with a url like this: http://localhost/?attachment_id=897. Can I set the default image link like http://localhost/wp-content/uploads/2012/05/dice.jpg ...
1
vote
2answers
137 views

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.
1
vote
1answer
1k views

How to make multiple sections in home pulling posts category wise?

This question may look foolish to everyone or novice , but i am working on a theme . It will be basically a news publishing theme . Right now , In my home page all posts are showing one after ...
0
votes
1answer
24 views

Is there a way to make the main page only display a brief description of the full article?

I want to make a new blog which only has a brief description of the article on the main page, instead of a shortened version of it. I want to make the brief description of the article myself. Is ...
0
votes
3answers
1k views

Downsides to not using built-in “Posts” post type?

I plan on skipping the Posts post type once and for all. This is a brand new portal. It will have 100s of thousands of content in the form of articles, multimedia, and links. Instead of Posts, I will ...
1
vote
3answers
122 views

Style Differently Edited Posts

Is there any way to add class to edited posts in order to style them differently? If there is a way to do that without adding a class, this option would be much better. EDITED - IGNORE THE ABOVE ...
3
votes
2answers
13k views

How to get posts published between a date and today?

Is it a way to get posts published between a date and today with query_posts() ? Example : All posts published since 2012-04-01 Thanks EDIT : How to add the filter date on this Query Posts ? ...
0
votes
1answer
317 views

How to change the post form from plugin?

I am starting making some wordpress plugin, so I am a beginer. I just wonder how can I change the post form of the pages. For example for adding some other input (of type file or text)? I am trying to ...
0
votes
1answer
1k views

How to show total view count across all posts for an author

I'm using wp-postviews to track views for posts by authors on my site. It stores the view count in the post meta field $views. I'd want to show on their profile a total count of views for all their ...
0
votes
1answer
160 views

retrieve post slug by post_tags taxonomy

My scenario: I have a part of a site which retrieves all post_tags terms for a specific category the code: query_posts('category_name='. $category[0]->cat_name); ...
1
vote
1answer
211 views

Get latest 3 posts from multiple CPT in one query

I'm looking to create a site wide feed on my site and have multiple custom post types. I'd like to display say 3 posts from at least 3 different post types. I can get the latest 10 posts across each ...
0
votes
2answers
108 views

Which file do I need to edit the All Posts page in the admin area?

I've never edited admin files before, but I need to edit the table used to list my posts in the admin area (on the All Posts page). Can someone please point me to the right file to edit? I've looked ...
0
votes
1answer
2k views

Query only Posts from Both of Two Category?

I have 3 categories, 1.OnGoing projects(cat id='5') 2.Completed Projects(cat id='6') 3.Upcoming Projects(cat id='7') and also i have another 2 categories:(Not a Sub Category) chennai (cat ...
0
votes
1answer
319 views

How to view all posts (on site, not admin) that are uncategorized?

I had a horrible problem a long time ago that had me end up importing a backup of most of my posts. I'm now using WordPress 3.3.2 and I would like to view all of the uncategorized posts from the site ...