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
2answers
7k views

How to get the number of posts in a selected category?

I would like to show the number of posts on the category page. How is it possible? I tried to find a solution but no luck.. Thank you!
2
votes
2answers
5k views

Get current menu_order

WordPress implements a simple order functionality by default. What's the common method, to retrieve the menu_order for the current post or page?
0
votes
1answer
52 views

how can authors to define custom pages?

I have a options page and i use this code. I want this, I add author id on sometext field (e.g 3,2,5,11 ) and my author.php redirect custom author page. My author.php <?php $post = $wp_query->...
0
votes
1answer
80 views

Help with listing current users submitted custom post type in template file

I have the following code to list the member's post that they created. However it is listing all posts. Anyone know how to fix it? Thank you! <?php if ( is_user_logged_in() ) { global $...
-1
votes
1answer
38 views

How do i retrive a post from a custom post type

How can i retrive a post from a Post Type were "distributie_seriale" is a relationship field. Ex: I add an Actor to PostType - actors ( Add post) next I add an Serial on PostType- serial ( Add ...
0
votes
1answer
238 views

How to add an admin function only to posts, not pages?

I'm having a problem with adding an excerpt counter to the excerpt field. It may be a conflict with another plugin, but basically it screws with other jquery if the excerpt field doesn't exist (e.g.: ...
0
votes
1answer
407 views

Building a Data Intensive Website with Wordpress

I am an intemediate website builder and have been working with wordpress for a few years. I am attempting to build a website (for myself) that is data intensive. All I've built to date are sites ...
1
vote
2answers
2k views

Including categories in search results

I am trying to include categories in search results. I've been searching for hours now with no solution. By "including categories" I don't mean search in a certain category, I mean let's say I have a ...
0
votes
1answer
104 views

Show last post of employee in his profile page

I have built a wordpress theme in which I have listed employees of the organization via custom post type. And I am displaying each employee via custom post type. The employees listed are authors in ...
0
votes
1answer
2k views

Facebook doesn't display the related thumbail for some posts

When I share some of my blog posts, Facebook doesn't display their right thumbail or anyn related image to the posts ... It just gives 3 unrelated thumbails to choose ... For example , FB shows the ...
1
vote
1answer
85 views

Query Posts With Over 1000 Views

The code below is from this link. It basically creates a hit counter, but I'm probably gonna have to do this by IP. How do I make a WP_Query, where only posts up to 1000 views can be seen on the ...
1
vote
1answer
988 views

How to filter posts that belong to a specific category only if that is the only category

I need to filter posts that belong to a category only if that is the only category. For example if my post A belongs to cat1 and I don't want to display posts that belong to cat1, post A won't be ...
0
votes
1answer
967 views

Limiting the amount of posts retrieved by the loop

I'm using a theme which has its own homepage which is created using the theme options (i.e. so can't add content under Pages) so I'm trying to add the latest posts on the page, I have copied the code ...
3
votes
2answers
1k views

Action hook 'wp' firing twice… why?

I noticed that when I hook into 'wp' it seems to be firing twice -- for example add_action('wp', 'just_testing'); function just_testing(){ global $post; error_log($post->ID); } returns ...
0
votes
2answers
421 views

Trying to query all posts in category 4

I have the following template page. I am attempting to output all of the articles from the category 4. However I am only getting some of the posts, about 20% of them. Not sure what would be causing ...
0
votes
2answers
117 views

Plugin is creating posts twice

I have code which takes some $_POST data and loops through it. In the loop, I store the $_POST data in variables and create a new post using those variables. The loop ends when I run out of $_POST ...
3
votes
1answer
391 views

Why is our post editor stuck at cols=40?

We recently upgrade Wordpress and it appears that our post editor is a very narrow textarea. Its stuck at 40 characters wide. Its very challenging to work with. More specifically its stuck with these ...
-1
votes
2answers
417 views

Excerpt with image

I would like to use my excerpt field to display a different image for each post to represent that post. For instance a post about a new album instead of having a title/text excerpt would simply be an ...
-1
votes
2answers
945 views

How to save the same post in multiple blogs?

I would like to write my post in one of the my 3 blogs and the same post will be published in the other two blogs. How can I do that?
2
votes
1answer
118 views

How can I list random authors from current post category?

The following lists authors of the current category. But I want this to be a list of 6 random authors from current post category. foreach((get_the_category()) as $category) { $postcat= $category-&...
0
votes
1answer
331 views

Remove read more

I'm using 3.5.1 and WP UI plugin. When i create a post, add automatically Read More button. Like this: <p class="wpui-readmore"><a title="Read more from NEWS" href="http://mysite.com/my-...
0
votes
3answers
688 views

Showing posts for today and future

I'm using the following code to display posts with todays date or in the future... except the future part isn't working. If I take out the if statement then it shows all posts - in the past, present ...
1
vote
1answer
49 views

How do I do this with WordPress? Taxonomies?

I was hoping to get some help with how I organise posts in WordPress. I have 2 Custom Post Types called 'Places' and 'Events'. In the Admin, I'd like to be able to create a 'Place' post and ...
0
votes
1answer
60 views

include other content type post ID not working

I am calling content type portfolio in a page but i want to show some pages by id with portfolio content type, below code only retrieve the portfolio posts. $args = array( 'post_type' => '...
0
votes
1answer
457 views

Display 3 posts with different HTML markup using a loop

I want to be able to display 3 posts from the same category on my index.php page, but due to the way my site's HTML/CSS is coded I'm having some difficulty understanding the correct way to go about ...
0
votes
1answer
156 views

Insert link to my thumbnail images

I am try to insert link to my thumbnail images, the link is hyperlink with post. When i put this code inside the loop then instead of showing the first image, first show the second image (template_url)...
1
vote
2answers
678 views

WP Query - duplicated posts once including tags in search results

I running WordPress on IIS & SQL server. As some of the plugins do not work correctly with DB ABSTRACTION I am using a lot of functions.php filters as so on. To make my search results include ...
0
votes
2answers
269 views

Getting posts from some categories plus some individual posts

I want to display list of all posts under a couple of categories and some individual posts. If I use the following code, it does not return anything, as it looks for those individual posts in the ...
0
votes
1answer
47 views

How to make a list of posts displaying them 5 by 5 with a “next posts” link?

I have been googling for the past 2 hours and haven't been able to figure this out, mainly because I am missing the right terminology, in other words, I don't know what I want in "wordpress words". ...
3
votes
1answer
219 views

Change permalinks for posts but not for custom post types

Currently my permalink structure for posts is domain.com/post-title I'm using a static front page and a "blog" page for posts. I'd like to to change the permalink structure for posts, tags and ...
1
vote
0answers
146 views

sql select for post_title and a term name

I'm having trouble trying to think out this SQL select I need to write; here's the gist: I'm programmatically creating posts by importing an excel file, so I'm in 100% sure of post titles, etc, since ...
0
votes
1answer
81 views

Security to delete post by Admin

My code is so simple like when admin delete a post by Wordpress fucntion (PHP) and do action with jQuery <?php include('../../../../../../wp-config.php'); if(current_user_can('edit_posts')){ $id = ...
0
votes
1answer
210 views

Custom Post Type archive

Hey all first off im a WP newbie so go easy! Ive been searching for a couple of days now to see if I can find the answer to this but cant get anything definitive. I have a custom post type called '...
0
votes
1answer
527 views

How can i list random post from multiple category?

I have an author page, and I want to list posts from current author's categories. e.g. I'm viewing John's page, and John wrote in Sport, Tech, News, Computer categories. Then my code list from this (...
1
vote
2answers
149 views

Is it possible to create a form post wordpress custom navigation link?

I work with a church that has a donate button on their site. The button uses a form post to connect with their simple checkout item and they want a button on the navigation to link to the donation ...
3
votes
1answer
166 views

Search widget breaks when using multiple loops?

I have created wordpress template that uses two loops via WP_Query object. Everything works fine except Search widget. I've been pulling my hairs out for three days now Googling like a madman,but didn'...
2
votes
1answer
408 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 ...
0
votes
1answer
1k views

how can i change WP main archives loop to sort by name or title

I've got the following code which i found somewhere else i use it for pagination. I don't understand all of it although I've read codex.wordpress.org/Class_Reference/WP_Query several times. they ...
0
votes
1answer
189 views

Multiple Blog Pages

some Preview Sites of WP Premium Themes show Multiple Blog pages with different Templates as example. a Full Width Blog Page a Medium Image Blog Page a Pinterest Style Blog Page. Now how do they do ...
0
votes
1answer
77 views

Disable sticky option for specific categories

Is there a way to disable the sticky option on posts in specific categories?
-1
votes
1answer
127 views

Notifications Bar on home page only

Is it possible to create an "Alert" button that can be turned on and off thru wp-admin. Of course the "Alert" button im asking for is to be published at the main page, but can only be turned on when ...
5
votes
3answers
759 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.
2
votes
1answer
1k views

How can I hook into creating a new post and execute wp_die(), before the post is inserted into the database?

Info about wp_die from codex: Kill WordPress execution and display HTML message with error message. A call to this function complements the die() PHP function. The difference is that HTML will be ...
2
votes
1answer
96 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 ...
1
vote
2answers
9k views

creating front end image uploader that uploads images as posts

there is this website lolhappens similar to 9gag. This is a website built over wordpress. How i am sure of this? check this link . Now to my best of knowledge this is a wordpress website where the ...
0
votes
2answers
183 views

Get a post's ID

How do I get a post's ID? I know I can use the_ID(), but I have to use it in The Loop. How can I get the post's ID without the loop? Because I think using the loop just to find the post's ID will slow ...
1
vote
1answer
293 views

Custom WP_Query with complex 'post_status' argument

I'm trying to run a WP_Query() with a bit of a twist. I need to include two post_statuses and specifically exclude another. I've got WP_Query( array( 'post_status' => array( 'publish', '...
1
vote
2answers
55 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 ...
0
votes
2answers
51 views

1 post, 2 templates

I want to be able to render post in two different styles (2 templates). For example, let's say I have the post ID 133, I would like two URLS to access it and so it renders where different template ...
1
vote
1answer
506 views

remove post and categories/tags count from right now dashboard widget

I know it is easily possible to add a post-type count for a custom post type to the right now dashboard widget. However I wonder if it is also possible to remove stuff from this widget. E.g. I don'...