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

Admin Posts Table Column Fitlering is not working for Custom Post Type

I have lot of posts in my custom post type. I want to filter it when I click on my post category. as like the following image. Here is my code to add it on click links. function ...
0
votes
0answers
37 views

Wordpress loop uses unmodified posts array, why?

I have this code in a Wordpress template: $prepost = $post; $normal_args = array( // here goes the args ); $normal_query = new WP_Query( $normal_args ); echo 'BEFORE: ' . ...
1
vote
1answer
34 views

How to inject a class for all option elements from wp_get_archives()?

I'm generating a list of all posts in a dropdown like so: wp_get_archives('type=postbypost&format=option&show_post_count=0'); This works, but doesn't allow me to modify/add things to each ...
0
votes
2answers
41 views

Add multiple meta keys to a post at once

I figured how to add an input value as a meta key value to a new post from a frontend post form (thanks to @thedeadmedic), but I can't figure how to add two or more meta keys at once. Is this possible ...
0
votes
1answer
22 views

Add a meta to a post submited from a frontend form

I use a frontend form by @TheDeadMedic to post regular posts. I figured out how to add to this form a category and a location (custom taxonomy) dropdown menus, and also how to sanitize and how to ...
0
votes
1answer
39 views

same template for multiple custom post type single

I know we could use single-custom-post.php But i have multiple custom post type like america nepal norway i can do single-america.php , single-nepal.php , single-norway. But they almost have same ...
0
votes
3answers
102 views

Static text above category page

I'm trying to add some static (welcome) text above my post excerpts, for which the posts page has been set up to display a category, in this case News. Link I've tried entering the following: ...
1
vote
1answer
74 views

How to change post status from publish to draft using hook in wordpress?

I want to change the status of already publish post to draft using its id. add_action( 'save_post', 'change_post_status', 1 ); function change_post_status( $post_id ){ $my_post = array( ...
0
votes
1answer
19 views

same archive template for different custom post

Suppose i have registered five custom post type like this america china nepal norway chile And to template the archive i should use like this inside theme folder isn't it? archive-america.php ...
0
votes
1answer
95 views

Developing a secure front end posting form

I want to add a front end posting functionality to one of my Wordpress sites. For more control and for more understanding of how this works (I am not a professional programmer) I choosed to use as a ...
0
votes
2answers
26 views

Create new post on user registration

I'm trying to create a post when a user registers using the code from here: Create posts on user registration The user registers and the post is created BUT the user firstname and user lastname is ...
1
vote
1answer
47 views

get_post_type_archive_link('post') returns current category archive

I am using get_post_type_archive_link('post') on my index.php page to get the url of all posts from all categories. I'm using it in a filter. I have listed all the categories separately using ...
3
votes
2answers
128 views

How do I reorder (pop and push) items from WP_Query?

I have this piece of code: $normal_args = array( 'order' => 'desc', 'ignore_sticky_posts' => 1, 'meta_query' => array( array( 'key' ...
0
votes
1answer
16 views

How can you control what a user is allowed to post in the backend?

Let's say when a user makes a post, rather than having them able to enter just anything into the Post Title input box, can I change that to be a dropdown with specific predetermined items? I've never ...
1
vote
1answer
38 views

Why can posts never have a number as the link?

Here's something interesting I noticed today - it is not possible to name a post a number - no matter what theme you use, and even if you name a post a long number that has no tag or post-name or ...
0
votes
1answer
46 views

List posts of assigned categories in list of all categories on single.php

here's what I'm trying to accomplish: I've got several categories, each of them have several posts. Now, on category.php I'm able to output a list of all categories and, inside this list, show a list ...
0
votes
2answers
22 views

Using single.php from plugin folder instead of default template folder

I am trying to figure out how to use another single.php for a custom plugin I'm making. It's for a custom post type. Because if people install this plugin, they won't have the custom ...
0
votes
1answer
36 views

Having pages after specifying post_type post

I want to loop through all posts in category 4,but why is there still pages in the result after specifying post_type post? $homeNeWs = new WP_Query(array( 'post_type' => 'post', ...
0
votes
0answers
24 views

How to add page template to my own post type

I want to add native box from Wordpress where users can set a post template in Wordpress Form plugin. In wpgform-post-type.php I have declaration of register_post_type. function ...
0
votes
1answer
46 views

WordPress Dashboard organize posts based on categories

In the WordPress Dashboard > Posts section we can view all posts based on Title and Date (by default it is organized based on recent date published). Is it possible to organize posts based on ...
0
votes
1answer
29 views

How Do I Get My Post Tags to Alphabetize?

I'm using a self-hosted WordPress site with a Child Theme of Twenty Thirteen. After I requested the same question in the above title, the Child Theme's Developer suggested that I come here and attempt ...
0
votes
2answers
44 views

Custom post types and 'new WP_Query'

I have custom post type 'Partnerzy' already set. While adding new 'Partner', you select a category (kredyty, leasingi, etc.). And having that, I need to show them on a page, like this: I figured out ...
1
vote
1answer
24 views

Transfer WordPress post to RoR site: is the REST Api the only and/or best solution?

I'm creating a new version of my site without WordPress, using Ruby on Rails. How can I transfer all my posts and users to this new site ? I was thinking of using the REST Api but none of the ...
0
votes
0answers
107 views

Ajax - Post Categories and Load More

I have a page_template on my front page where I want to show "all post category" by default with a maximum of 5 post, but there will be buttons for each of my category, so when they click on a ...
0
votes
1answer
27 views

Display result of custom form

The website I am working on can list restaurants and we can rate them. Currently, I'm developing a multi criteria search to find the good one. I created a custom HTML form with XYZ Html (plugin) and ...
0
votes
0answers
27 views

wp query custom orderby not custom field

I am working on a products archive page where I show 20 products on each page with pagination. Each product's price is calculated by a formule which gets his parameters by data saved in the database. ...
0
votes
1answer
77 views

Custom Post Type

I have the following code that brings in 3 posts or project posts; But I'd like it to show only posts form the current post category; <?php get_header(); ?> <article class="post"> ...
0
votes
1answer
24 views

I want to show my post for limited time, how is it possible?

I want to make one website like a newspaper, so i want to show my daily post for one day or limited time, after one day previous post will go to archive and no longer show on web page, how is it ...
0
votes
1answer
30 views

All my Post don't show, only show headline on Hompage

I'm new to wordpress. I host my site on Godaddy. Recently, last night, all my post stop showing when clicked. Works fine on homepage, but when click it would respond "Error 404"... Please Help me out! ...
0
votes
1answer
33 views

How to enable comments meta box for other author posts?

I am working with a ticket system. which is a custom post type I created as ticket. And allowed to submit tickets in the front of my site. The registered users can post a new ticket, which Can be ...
0
votes
1answer
26 views

How can I choose and change a post title at random from an array when it is published?

I want to populate an array with post titles and change the title of the post (which is a draft) to a random member of the array of titles. Something like this? function set_random_title ($title) ...
1
vote
0answers
11 views

get_adjacent_post by language

I am using Polylang plugin, which assigns each post to a taxonomy 'language'. While using get_adjacent_post() I want to bring only those posts that belong to the language currently displayed. So I ...
0
votes
1answer
27 views

WP Blog Page Problems - Been stuck for a week

So I have my site in maintenance mode. I am almost done but have been stuck for over a week and not sure what to do. I have a site with multiple pages one of which is my blog page. If I set the ...
-2
votes
4answers
33 views

How to remove a date from wordpress post

djeddiedavid.info this is my website i want to remove a date that show on wordpress posts anyone help me ? date that show on the bottom of DJ upcoming event
0
votes
1answer
34 views

Get all images out of the posts content

I try to get all images out of the content-area of a post. I already tried this $imgs = get_posts(array( 'post_type' => 'attachment', 'post_per_page' => -1, 'post_parent' => ...
0
votes
2answers
18 views

Everytime I create my Events page, it shows up as an archive post instead of an actual page

I had an events page on my site's main menu in which I attempted to adjust some css when to my horror, I discovered the page appeared as an archive. I checked in the specific page in question in the ...
0
votes
0answers
8 views

Linking posts and categories using an automata

I migrated a blog from Blogger to WP and now have some 900 posts to which I have to assign categories. Doing it manually isn't practical, so I designed a parser looking for keywords in the posts. All ...
0
votes
1answer
26 views

Is it possible to filter the main loop to exclude posts from a specific category?

The question is the same as the title. I'm talking about the default loop on the blog page / home page. I am using a network blog and must apply it to all blogs.
0
votes
0answers
19 views

Add Postbox for Featured Image Caption in wp-admin/post-new.php

I'm newbie here. I want to add postbox / meta box in my wp-admin/post-new.php page. Someone please help me. Last days i have try to search it in any tutorial, but i cannt solve it. I try to modify ...
1
vote
0answers
57 views

List all categories with featuread image from post?

With this code I show all categories: <?php $args = array( 'orderby' => 'name', 'parent' => 0 ); $categories = get_categories( $args ); foreach ( $categories as $category ) { echo ...
0
votes
1answer
56 views

Alternate row and columns every X posts

Does somebody know ho to accomplish the following structure with a Wordpress loop, and repeat it for all my posts? Would be really helpful. I tried to modify the code Joshua provided here: ...
2
votes
1answer
63 views

wp_insert_post question [closed]

with the wp_insert_post i want to insert text from a html-form. This is my string i want to insert: [code] #include<stdio.h> int main() { printf("Hello World\n"); return 0; }[/code] when i ...
0
votes
1answer
15 views

Querying multiple categories in the WP loop if one of the category IDs is dynamically obtained

I don't know exactly where this is going wrong, but what I figure is happening is that the category I am dynamically obtaining based not the BuddyPress Group slug (post categories have matching names) ...
0
votes
2answers
35 views

Can I change my post type to anything and my site still work?

I'm working on an application using WP as my CMS. I was successfully creating new posts and working with them in my app. But I noticed when visitors went to the website they were being listed in the ...
2
votes
3answers
156 views

How to disable content pagination?

I want to totally disable this functionality from WordPress because I'm implementing my own version of this with Javascript. When I try to grab all the content in a post via the get_the_content() or ...
0
votes
3answers
88 views

Add review box by function at top or bottom of content

Filter add_filter( 'the_content', 'sandy_posts_filter' ); function sandy_posts_filter( $content ) { global $post; $review_box_pos =get_post_meta( $post->ID, ...
0
votes
1answer
11 views

Add category information beneath post?

I was wondering if it's possible to automatically show some text about a given category beneath the post. I'd like to be able to show some text beneath some (but not all) categories. Use case: I'm ...
0
votes
0answers
55 views

Wordpress REST API not returning all posts

I am trying to get the json data of my posts. I have tried with both v1.2.4 and v2 of the REST API plugin. If I enter http://example.com/wp-json/posts?type=magazine or ...
0
votes
0answers
23 views

Error after saving or updating post

I am getting the following error every time I update or save a post: Warning: stripslashes() expects parameter 1 to be string, array given in ...
1
vote
1answer
92 views

Locked/Unlocked in title

This should be incredibly easy, but I'm missing something. This code should simply work if they have entered their password into a password protected post/page. The idea is to remind them it is ...