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
0answers
8 views

Where is object, property or label in the database that controls the order of the posts being displayed?

I'm trying to update the database once the user has re ordered the posts via a draggable js plugin whilst is_user_logged_in(). I'll probably have a save button on the front end (in logged in mode of ...
0
votes
0answers
14 views

two permalinks for the same post

Do you know a way of having two permalinks for the same post? I have post with an hebrew slug and i want to have the same result with an english slug i'll give it.
0
votes
3answers
40 views

How to get links to the last N posts in a specific category?

I want to display the titles of the last N posts in a specific category. I am using the following code: <?php $cat_id=get_cat_ID('category1'); $posts = get_posts ...
1
vote
1answer
29 views

How to display different number of posts

How do I display different number of posts on the home page and archive pages, the archive pages can use the value set in the admin, but I want a custom number of posts to be displayed on the home ...
0
votes
0answers
52 views

Display wordpress post's in popup?

I am developing a wordpress site with some blogs.Each blog post will have an READ MORE link.when clicking the READ MORE it should open a popup box with that post contents. Can any one suggest me on ...
0
votes
1answer
38 views

Loop doesn't exclude the specified category in home page

Oh, hello! I want to show the three most recent blog posts in the home page, excluding the "featured" category, which has the ID 8. In order to see the ID for that category, I went to Posts > Category ...
0
votes
1answer
37 views

Strange switch_to_blog() issue

OK, so WordPress has been destroying me this afternoon and this particular issue I really can't figure out. We are building a multisite network and for our particular purpose need to loop through each ...
0
votes
2answers
130 views

How to get current post ID in functions.php

This is my code in functions.php file. function getcity(){ global $wpdb; if($_POST['state']) { $id=$_POST['state']; $postid=$_POST['post_id']; $district = ...
0
votes
1answer
30 views

Archiving posts in wordpress

I will have lot of posts in my wordpress site. And I want a archiving functionality. I have a separate section in my site which will show only the archives, and the archived posts will not show up in ...
0
votes
1answer
43 views

How to compare post tags?

I want to compare post tags. If the tags match, then display the matching post. For example, I have a post called "ONE" with some tags and another post called "TWO" with some tags. I want to compare ...
0
votes
1answer
26 views

wp_update_post question on array

How can I run the wp_update_post function on an array of post ids.It doesn't seem to respond to an array although I don't get an error and only seems to work for one? $post_id = array(1235,1234,1228, ...
0
votes
1answer
27 views

Get posts with multiple categories

How to get just the common posts of 2 different categories? consider this category tree: posttype -news -arrangement --course --competetion --other region -region1 -region2 -region3 Now I want to ...
0
votes
1answer
823 views

How to embed the content of one post into another site

I have two websites, and I want to embed the content of one post on one of these sites, into a post in the other site. I have looked at various plugins but can't find anything that works. I can ...
0
votes
0answers
31 views

How to display related posts based on specific shared subcategories with current post

Im trying to find a way to display related posts that share specific subcategories with the current post. So for example, lets say the current post has the following subcategories associated with ...
0
votes
0answers
16 views

Custom Post Type Hierarchy and URL

I am utilizing the standard post and making them a person so I'll have a URL like the following: website.com/person-nam I want to create a custom post type so the user can create their own posts and ...
3
votes
1answer
649 views

When a user creates a post (pending), send a confirmation link that allows them to publish

I've got another question for you guys! I need the following thing: User creates post (automatically sets it to pending for approval) Send the user an email with a confirmation link The User clicks ...
0
votes
0answers
10 views

How to generate WordPress post by Month?

I'm new to WordPress and php.. I'm trying to figure out how to generate WordPress post by month in list style format. So all post for October would post under one month, then start a new block for ...
0
votes
1answer
27 views

How do I link a Post Type to a Template in Masterplan?

I've made a new .php theme page and want to use that file on one of my Post Types. In the Templates part of Masterpress Ive added my Post Type in the availability section. However, when I view my ...
0
votes
1answer
62 views

How to pick “full/thumbnail” images in the loop?

I am picking the latest posts through the WordPress loop using the below code, but it's picking all images at full size: if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...
2
votes
3answers
265 views

how to limit edit_form_after_title hook to page and post edit only?

heelo, I want to use this great hook edit_form_after_title it was announced on December 1, 2012: http://make.wordpress.org/core/2012/12/01/more-hooks-on-the-edit-screen/ it curreclty hook for : ...
0
votes
1answer
20 views

exclude one child by id from $post->post_parent

I'm trying to exclude one child from the children of a parent. What do I need to change here? thanks if ( $post->post_parent == '4426' || in_array( '4426', $post->ancestors) && ...
-2
votes
1answer
30 views

Return All Post from publish to draft

I do something error, I transfer yesterday all post from draft to publish by my user, Now how can i return all this post to draft ??
0
votes
0answers
8 views

Multi users adding their name to a post

I'm trying to figure out a solution for a catering site. Basically, the owner will create a new post with the event details. All the employees will have their own user (something like subscriber or ...
0
votes
0answers
20 views

Display all 'uploaded to' images for a page/post in 'edit' admin area

I'm using the Frontend Uploader plugin in order to allow people to allow images to posts. This allows images to be 'attached' to posts. I can display a gallery of all attached images on the frontend ...
0
votes
2answers
57 views

How to get post ID of the current page/post inside a widget?

I'm trying hard to get the post ID of the current post/page inside a widget class but doesn't work, I know there's get_the_ID() and some other options but not a single works inside a widget. Here's my ...
1
vote
1answer
33 views

Email Post Attachment on wp_insert_post Action

I have a frontend form that uses wp_insert_post() to programmatically insert posts into the site with "pending" status. I'm also using insert_attachment() to attach the submitted file to the post. ...
0
votes
0answers
37 views

Access to the header cropping tool in modal

For the moment I access the media uploader via a meta box from the edit post screen. The code works: no problem. However, I would like to know how to be redirected to the crop tool right after the ...
0
votes
0answers
24 views

Get all post that not have any category

i am creating a frontend dashboard where i need to show all the post . So i need to show posts with all post status. Mainly published, trashed and the pending. and without category I am now using ...
0
votes
3answers
5k views

How to load post content on index page using ajax when post title in sidebar is clicked

I'm working on a new blog which display in a list, on sidebar, some categories and the posts of them. In the index page, in main content, I list some post titles from other category "New". What I ...
0
votes
0answers
28 views

Want to get posts with their content with their category and subcategory?

I am working on a theme in which I have to show all the posts with their dedicated category and subcategory. Actually I have tried on Google and codex, but I can't find what I want. Actually I have ...
0
votes
0answers
7 views

How can get all node and id and date form 01-01-2014 and from WordPress start from 01-01-2014

I have site in drupal and i need to convert it to WordPress, So i convert all my content and node from drupal to WordPress, But i need to get all node and date from Drupal and all post and date from ...
0
votes
1answer
29 views

How to define which register_post_status goes to which register_post_type?

New to registering post types but looking at samples, and the codex not helpful here. I am not understanding how the two of these relate? This is just bare bones so someone can explain (the parameter ...
0
votes
1answer
19 views

find view post hyperlink in PHP wordpress admin file

a very simple question regarding the Wordpress backend. I would like to hardcode the link of "view post" in the post section. does anyone of you know which part I find it? Thanks
1
vote
2answers
43 views

When and Where is `global $post` Set and Available?

Usually when people think of the global $post object it's assumed that it's actually set whenever you enter The Loop. I started to play around with how early I could actually call global $post which ...
0
votes
1answer
78 views

Automatically set posts to NoIndex depending on category?

I'd like all new posts with a specific category to automatically have NoIndex applied. There are various plugins - e.g. Wordpress SEO - which make it easier to manually select posts for NoIndex. But ...
1
vote
1answer
56 views

Post slugs and images cannot have same name?

If I go to Media Library and upload an image called apple-pie.jpg And then I create a post called www.domain.com/apple-pie/ The link does NOT take me to the post. Instead the link will take me to a ...
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
1answer
27 views

Inserting custom data to the_post() during loop

I have some posts on my WordPress site, and let's say I want to add a random number for each post with $num as key and random() as value. Then I want to access them with something like: $post->num ...
0
votes
3answers
45 views

Get post_content with <p> tags?

I'm trying to retrieve the post content of an specific post $post = get_post(/* id */); $content = $post->post_content; However this retrieves the content with no line-breaks. I noticed this is ...
0
votes
0answers
78 views

Display page content inside a onclick popup or fancybox or lightbox

I'm doing a single page theme. So in that I would like to have some links which load the page content of the page inside a fancybox or lightbox. I've already tried Best way to load page content in ...
0
votes
1answer
298 views

SQL Bulk Move old posts by one author to another category

I'm looking to move a number of old posts by one author from one category to another category and was hoping someone could help me do this? I figure the easiest way would be through an SQL command? ...
0
votes
1answer
187 views

post__in not working with pre_get_posts, but post__not_in does work

I have an action setup on pre_get_posts which I would like to use post__in on. I used the following code as a test: $query->set('post__not_in', array(74485,1528,71460)); This works, the total ...
0
votes
1answer
23 views

How to get only current images of a post

I am new to WordPress. I have created a template page where I want to show single posts, So to get media of that post I am using a function $args = array( 'post_type' => 'attachment', ...
0
votes
0answers
20 views

Categories showing up on wrong page

I do not run the site, but am doing some updates. One of the ones I was asked to do is remove the cats from the adopt a dog or puppy page. When I go into the dashboard and look at the posts, they all ...
5
votes
4answers
339 views

Are post ID's reliable?

I understand that post ID's are unique, but are they reliable as persistent data ID's? More specifically, is there a guarantee that, through a migration or another data exchange, post ID's will not ...
0
votes
1answer
67 views

Bulk update post slugs through database

Is there a way to bulk update permalinks through the database? cause I have like 20k posts and all I want to do is add a prefix to the permalink. I could just manually update but that's too tiresome ...
0
votes
1answer
79 views

How to add category post count in main navigation menu [closed]

Can you guys can help me on how to add/show the post count for category in main menu. eg: Web Design (10) | Typography (12) | Inspiration (10) | Business (19) I’m using Hueman & Hueman child ...
3
votes
5answers
7k views

Front end post editing using a form

I have a custom-post type with the standard meta boxes and some custom fields. How could I edit a post through a form in the frontend?
0
votes
1answer
312 views

How to show related posts by category or custom post type?

I'm looking for the best way to go about creating, probably, custom post type where you can filter in the categories related to that custom post type in the sidebar. Here is the website I'm working ...
0
votes
1answer
29 views

New posts defaulting to '0' primary key

When trying to create a new blog post, Wordpress is showing a Database error: WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_posts` ...