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
55 views

How to get post with slug and exclude categories

I want to do a query to get posts with a slug and category__not_in. Here's what I do: $query = array( "name" => "test", "category__not_in" => array( 15 ) ); query_posts( $query ); ...
2
votes
1answer
35 views

get_post_field - Title without paragraph

Normally I wouldn't insert a single post with a technique like this, but sadly this project requires it. I try to call the post_title with: echo apply_filters( 'the_content', get_post_field( '...
0
votes
1answer
44 views

How to get a post's content? [closed]

I'd like to known what is the best solution for getting a sepecific post's content. By slug, tag, id or category ? Or template assigned to this post ? I don't like the way to find this post by its id ...
0
votes
0answers
22 views

View all multisite posts from one “hub” site

I'm creating a centralized blogging network for a client. The idea is that, on one of the many sites, the client can see a list of all the posts on all the sites. The interface for this would ideally ...
0
votes
1answer
17 views

Sort Events by Venue Title - Sort Post set by related post ids

In wordpress, I am using The Events Calendar Plugin to host events. This includes two post types: events and venues. On an index page, I would like to list ALL events, but ordered by their ...
1
vote
1answer
40 views

How i can limit period of post publication?

I need to limit period od post publication - admin type date, for example, 30.05.2016 in custom fields and then i need to hide custom posts with this date less, then today date How i can do this?
-2
votes
1answer
21 views

How does Wordpress add the comments and comment form to posts

I have created tabs in my single.php file. I would like to move my comments from the bottom of the posts to the comments tab. I have can't seem to find how to do this. I have copied everything from ...
0
votes
0answers
24 views

How to add New Post On clicking a button?

I have a custom post type name guide_tutorial.As I add new post It creates a button name Add Pointer.On clicking the Add pointer button its open a popup which have details about pointer .Now I want ...
3
votes
3answers
130 views

post__in for get_posts with a dynamic array

I am creating an RSS feed. I have created a table in my database with 400 post id's. I have the rss feed coded I am now trying to link the two so my RSS feed runs only for the list of 400 posts from ...
0
votes
0answers
20 views

Why are all posts older than a certain date missing from filtered Post lists in wp-admin?

I'm experiencing a strange issue where all posts older than a certain (seemingly arbitrary) date do not show up in the Posts manager, but only when looking at a filtered view (by post format, category,...
0
votes
1answer
36 views

Get posts and include taxonomy term

How can I return taxonomy terms within post data, from the same query. Currently I'm calling get_posts / wp_query and then looping over and calling wp_get_post_terms. Needless to say it thrashes the ...
0
votes
1answer
27 views

After ajax image is outside the `<a>` tag

I am loading some content via AJAX, and basically I have this line: $storage .= '<a href='.get_permalink($id).'><img src="'.$image['url'].'" /></a>'; Which gets rendered as: <...
0
votes
0answers
45 views

get_object_taxonomies() returns null for custom post type

can any body tell me what will be the issue in function get_object_taxonomies() which returns null for custom post type..... the function is given as function insert_city($term) { echo $term."<...
0
votes
0answers
27 views

Is there a global page/post/product/anything ID?

I am working on compression plugin and need to save compressed styles in to a file. Compression process is done but I need a unique page ID for any WP page in order to save and name the compressed ...
0
votes
1answer
13 views

How do I create a 'selection' criteria list' that will then dictate which posts are generated when the user presses search?

I'm very new to WordPress so please bear with me! I'm currently in the process of building a site for work. Our 'vision' is that we have three lists of options. People would select one option from ...
0
votes
0answers
14 views

How to set the template of a page created via plugin with template inside plugin

I've been trying to make a plugin that creates a couple of pages and then sets their template. This issue is that I have the templates inside the plugin. To create the pages I'm using: $post = ...
-1
votes
1answer
22 views

I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in publish

I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in publish. $post_status = 'draft'; I would like to use publish. What should I ...
0
votes
0answers
17 views

Multiple tags to create an RSS feed not working as docs describe

I'm trying to create an RSS feed that is based off of AND not OR with tags. In the codex https://codex.wordpress.org/WordPress_Feeds it says that you can use the format: http://www.example.com/tag/...
1
vote
0answers
31 views

Posts and Attachments with “Published” status in Search

I would like the search to show only published posts and attachments (the attachments are photographs taken directly from the media library). The trouble is, when I specify that the post_status must ...
-1
votes
2answers
29 views

How to find the page of specific post?

i have a specific post and i have a website (example.com) that have pagination 1, 2, 3, ... what is the page of my mentioned post in this pagination. for example is it example.com/page/5 or 6 or etc. ...
0
votes
2answers
64 views

How I can made a custom post type to page templates?

In my site, I created a custom post type called: "Pictures" add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'Pictures', array( 'labels' => ...
0
votes
0answers
23 views

Can not be able to insert the custom post taxonomy

here is my code in which i can't get insert the term in custom post type taxonomy .as in the the code in wp_insert_term($term,$taxonomy,$args); cannot work , while it is working if i put a string ...
-3
votes
1answer
30 views

How to get Recent post id

By using following code global $post; echo $post_id; I'll get the post id. how do i get recent posted id?? I have tried this also echo $id = get_the_id(); I have tried googling am not getting ...
0
votes
1answer
36 views

Wordpress each user has each content for a page,how to do that?

I am a newer of PHP language,I have a project of user system,that need each user has each different content,I place the content to a page,when user login,open this page will display that content.To do ...
6
votes
3answers
68 views

Random sort within an already sorted query

I have a working query which returns a set of custom posts which are ordered by their package ID (ASC). For a query with 9 results this may return for example: 4 posts (Post ID's 1,2,3,4) with ...
3
votes
1answer
28 views

Where can I find the code how wordpress parses a post?

When you write a post in text section instead of visual WordPress will work with HTML. But when you save the post and preview it, it will transform your HTML-like text into real HTML with proper ...
0
votes
0answers
46 views

Add post order to function

How to add post order to this function? I would like to display most recent post from newest to oldest: <?php //Establish first post check variable $first_post = true; query_posts('category_name=...
0
votes
0answers
30 views

How to get post count including nested categories

I am traversing through categories using function like this function hierarchical_term_tree($category = 0) { $r = ''; $args = array( 'parent' => $category, ); $next = ...
0
votes
1answer
32 views

Wordpress Request Post All Post ID in a Loop? [closed]

I would like to ask if there's a way on WordPress to get fetch all of the page's Field?... I am using a Advance Custom Field Plugin and would like to fetch data's from fields inputted over those ...
0
votes
1answer
25 views

show recent posts php code error?

I'm using this code to show my recent posts in my website: <div class="post_content"> <div class="home_posts"> <?php $args2 = array( ...
0
votes
1answer
25 views

How to get all posts belongs to a user between a certain date

I am writing a plugin for my company so I need to get all posts belongs to a user between a certain date which is given by another user. Then I want to count words for each post and finally add them ...
0
votes
0answers
16 views

Hook and prevent certain posts from being imported

0 down vote favorite I'm using WP ALL Import to import thousands of posts from a custom XML file. I filter it the best I can with XPath, but some conditions have to be done in PHP. How can I hook ...
0
votes
0answers
24 views

Categories option not appearing in post meta box

While create new post, categories options is not visible in screen options. where I can find to show categories option while adding new post?
0
votes
0answers
17 views

How can I deny the user the insertion of emails in topics / comments and stay on the same page?

I have this function that checks whether or not a content contains an email: function fw_check_if_content_contains_email( $content ) { if (preg_match('/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/...
0
votes
1answer
43 views

Apply filters when loading post via ajax

Have been trying to solve this for couple of hours already. Here's the case: I'm making a plugin that separates the posts into pages using the <!--nextpage--> tag. It works fine but I want to ...
0
votes
0answers
23 views

Issue linking to custom post type posts

I am having issues linking to a custom post type post. There is a shortcode that loads a list of posts for "applications" on the site I am working on. I am not sure what code to use to have it call ...
2
votes
0answers
50 views

How to load paginated post pages via ajax

Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
0
votes
0answers
37 views

First hook to use current page post id

I'm trying to find the first hook that will pass the current post ID, as I would like to update the current post (by getting its ID) and the variables submitted to that page. This is the code I'm ...
0
votes
0answers
42 views

Fixing the WP Post Object for Custom Route

I'm currently in the process of building a custom plugin for a client that involves displaying front end user profiles for any "subscribers". These profiles will be populated with various user meta as ...
0
votes
1answer
134 views

How to Submit Post Via cURL & PHP

Thanks for reading. I'm trying to submit a post via PHP. I'm filling in a large number of posts from a good amount of data I've scraped so I need this to be automated. I don't have the time (or ...
0
votes
0answers
11 views

Category specific attribute

I wonder what is the best way to define specific attribute for category. My idea is following. I have some categories that are just wrappers, they don't contain any post so they are only parent ...
0
votes
0answers
22 views

Query returning 1 post per page but saying it has 71 pages with almost 1500 results in total

Something is definitely not right here and I honestly cannot understand what it it. After I put this code on one of my custom made plugins, although it makes the search correctly (the result ...
0
votes
1answer
27 views

Is there any hook to change media html in post? [duplicate]

When I add image to a post, wordpress makes this html format in theme. <p> <img class="aligncenter size-full wp-image-455" src="http://localhost/pb/wp-content/uploads/20116/04/huracan-...
0
votes
1answer
18 views

Post URL duplication adds numerical value

I thought that belonging to these different categories url naming posts the same would be treated as distinct. Categories: Home Hotel Posts: street street URL generated: www.my.com.br/...
3
votes
2answers
141 views

Search & Remove Specific Shortcode From All Posts

Question Is there a way to remove a specific shortcode, say [print_me] from all the posts where it appears in one shot. And I don't mean mask it or filter it so it doesn't show up while it stays in ...
4
votes
1answer
88 views

Hiding posts from non logged in users

I wish to hide certain posts for anyone that is not logged in. I tried the Restrict Content (RC) plugin but that did only hide the content of posts, i wish to omit the post completely. Using RC as a ...
0
votes
2answers
15 views

Detecting current page from class method

I've tried to look for a specific answer/tutorial on this subject but I'm coming up short and wanted to see what the SE community could suggest. At this point, any guidance whatsoever would be most ...
0
votes
1answer
27 views

Sticky Post from page 2 and on

Today I updated an old blog post and set it to sticky to show info about the latest changes. It’s a typical post with Site Updates as the title for a log of a sort you could say, with past changes ...
0
votes
0answers
9 views

Automatic format non-formatted imported posts

I imported a lot of posts, some of them are good formatted, but most of them are non-formatted, without spaces after comma or dot(s), no new paragraph. In fact this is short example of article: Hi ...
0
votes
2answers
28 views

How can I alternate styling of images in a post? [closed]

I'm working on a theme for a travel blog and the author likes to insert small images in the text of their posts (an example is here). I want the images to alternatingly float left or right (so the ...