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

post expire after x days

I want to create a code snippet for expiration of post after x days from the post published date, I tried with this code but I always displays the true condition, what am I doing wrong? $pfx_date ...
1
vote
1answer
17 views

Include sticky posts on the static page front page

I have a static front page that lists out news. Right now, it ignores the stickiness of a post, and justs lists it. I want it to work the same way as my blog posts page does. I want it to list out all ...
0
votes
1answer
17 views

store posts_id of category into a varable?

I have ten posts in my query that belong in three categories: cat-a,cat-b,cat-c. I'm looking for a way to store $posts_ids from each category into a variable. Say for example, if three posts are in ...
0
votes
1answer
22 views

pagination on data fetched using SQL query

I am new with php and word press. I have a question that I am using a sql query in my posts to get data from my data base. Now the problem is that I have huge data on my post and I do not have idea ...
0
votes
0answers
9 views

Two separate category blog excerpts on static front page

I currently have my main blog set up under a category and another category setup to give the illusion of two sep blogs on WP. The setup I'm trying to achieve is this. Front-page (static) -blog-...
-1
votes
0answers
29 views

How to export CSV file for custom post type in WordPress without using plug-in?

I am new to Wordpress. I created the custom post types using Types plug-in and created some posts in that. Now I want to export the post as a CSV file without using Wordpress plug-in ?. Can anyone ...
1
vote
0answers
21 views

Transferring WordPress Database - Serialised data

I'm attempting to migrate data that is using a plugin (WordPress Job Board) to a new instance of a plugin (WordPress Job Manager). The plugins are storing data differently in certain parts of the data....
0
votes
0answers
42 views

Submit the form#post form via Javascript [on hold]

I have been working on a workflow for our lesser tech savy writers. They wanted things very spelled out, so I've created the below meta box and have hidden the publish meta box on an edit post page. ...
0
votes
1answer
17 views

get_next_post() not working

I'm using get_next_post() and get_previous_post() in single.php. But the problem is it's not displaying Next post on all single posts. The previous post is displaying on every single page fine but ...
0
votes
2answers
15 views

How to filter url on post submission?

I would like to swap out image URLs upon post submission on both content editor field and a custom field cover_image of a custom post type article. For example, the original content may contain image ...
0
votes
1answer
16 views

Custom Post Type by user

I made a Custom Post Type for events that can be added in the admin by only certain groups of users, like a Secretary. This Secretary can add some new events, but I want to display each user his own ...
1
vote
1answer
25 views

Batch process: remove first image from post content

I already added a featured post image to all my posts (>1000). Some posts (around 700) still have an image at the beginning of the post content. Now I need to remove all images which are right at ...
1
vote
1answer
24 views

Most viewed post for the last 2 days using WP_Query

Hello I have code intended to get the most viewed post for last 2 days and it seems like not working or maybe my code is just incorrect. I appreciate any help. Thanks. $args = array( 'post_type'...
0
votes
1answer
30 views

Wordpress display posts category in loop

I am working on a WordPress theme and this is my code to display posts. However I'm struggling to display all categories for a post. Most solutions don't work for me but do for others. That's also ...
1
vote
2answers
29 views

How can I make existing custom fields easier to edit/add in my theme?

A Wordpress theme I have authored uses Custom Fields on posts. There are about 5 or 6 custom fields to set when authoring a post, and my users have a hard time remembering what to enter for the name ...
-1
votes
3answers
103 views
+50

Adding a blog archive with pagination using WP_Query

I have the following code:- <!-- News Archive --> <div id="news-archive"> <div class="row"> <div class="col-md-12"> <?php $paged = (...
1
vote
1answer
17 views

How to change wordpress dates to native language (even if the languge not available i wordpress)

I have a fully native language website ( Sinhala ). Content is fine and works with sinhala text. But unfortunately I cannot get the dates to be shown in Sinhala ( in posts new etc). Also I need to get ...
-3
votes
0answers
23 views

User submitted post, post URL problem

With user submitted post plugin I add post submitted successfully, but post URL is not working. I entered post URL in form but post title doesn't redirect it to post url. By default it redirect to ...
-2
votes
0answers
14 views

Posts 2 Posts Plugin Guidance [closed]

I'm making a doctor portal clinic website in which the doctor will have the WordPress dashboard in which he will be able to add the patient's details, prescription, etc For Patients and Prescriptions ...
-4
votes
0answers
24 views

Filter Ajax Dynamic Archives Custom Posts Always not Showing Correct Result

Hy everyones, I'm building filter search using multi select option, when I'm selecting the country and then result of filter search always show all posts Here is my template <div class="row"> ...
-2
votes
0answers
21 views

How can I disable author and hide their posts?

I want to disbale authors and after that they gonna be hide such as their posts, media and etc. also on the contrary of above , when i active authors their posts display to every one Any idea?
0
votes
0answers
11 views

Adding images in widget based on post name!

I have a wordpress blog for products, each product has a unique ID and should have a photo demonstration! I have installed the blog added the products as posts! Now I would like to add a bulk of ...
0
votes
0answers
40 views

How to query all posts and only show the first 6?

I currently have the following code: <div id="news-archive"> <div class="row"> <div class="col-md-12"> <?php $args = array( 'post_type' =&...
0
votes
1answer
16 views

Get the category of post

I am on the single.php file and I am trying to get the category of a blog post which is either Blog or News. The reason I want to do this is that the website I am building has both a Blog and a News ...
0
votes
1answer
15 views

How to share same post to multiple site in wordpress?

We are developing WordPress with multiple site. We need to share some posts to more than one site. We need to save post in more than one sites with a single click. I have searched in Google, but I ...
0
votes
1answer
24 views

Shortcode: How to add custom posts?

I am having problems with post__in shortcode atts. It does not show anything. I think the problem is that post__in must be an array but the shortcode ID returns string. function courses_shortcode($...
-2
votes
1answer
40 views

How to get if category has posts?

I have problem with getting get_category('2')->category_count number. I want to have list of news which are as a post in one category. I use plugin for insert php (I know it can be used by theme). ...
-1
votes
0answers
12 views

Processing multiple shortcodes in one post at once

I'm creating a shortcode that needs to access the database. I'm expecting this shortcode to be used many times per post. This means it will access the database many times. Is there a way to get all ...
0
votes
0answers
24 views

Reverse pagination on custom post type (portfolio)

I want the pagination on individual portfolio posts to "reverse" its function. In other words, when you click into the portfolio post in the top left of the archive page, you would see a link for "...
0
votes
1answer
17 views

Only show related posts when another post has same term

Trying to build an easy "related posts" call, I would like to have it only shown, when another post has the exact same term and shows up. It works at the moment so far, but also shows up, when the ...
0
votes
0answers
21 views

Wordpress 4.5.3: How to remove shortcode from displaying in gallery post

#gallery-1 { margin: auto; } #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 33%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { ...
-2
votes
2answers
74 views

Onclick open posts displayed in slider in a popup

In the attached image, the posts are displayed in a slider style. When I click on post in the slider, suppose CArd5, then the details should of that post eg: the thumbnail, excerpt etc should be ...
-1
votes
0answers
21 views

functions.php page not being refreshed for certain pages

I have made changes to my functions.php page the child version. My changes are being rendered in some pages but not all. I have tried this on a fresh browser cleared cache etc but still some pages are ...
-1
votes
0answers
30 views

Shuffling Posts On First Load?

I have a category with 20 posts and I would like to shuffle the posts on the page for each individual user that visits the blog. I don't want the posts to constantly change order on reload, so what ...
0
votes
1answer
13 views

Precedence of page permalinks over woocommerce product category links?

I have a situation I cannot quite understand, and wonder if someone could help me do so. We are developing an e-commerce store (WP + Woocommerce) Individual artists are represented by Pages (each ...
-3
votes
1answer
44 views

Group posts by year in loop

How can I separate posts by year in archive page for Custom Post Type? while ( have_posts() ) : the_post(); the_title(); the_post_thumbnail('thumb'); endwhile; The end result would look ...
0
votes
0answers
24 views

Merge content post with already posted post with same title

I want to merge content with same post title each time i have the code which can delete old one and it takes place with new one but i want to merge content with break line tag .. right below the ...
0
votes
3answers
169 views

separate the post of a category by subcategory

I'm dynamically generating my category post by getting the Page title and match it with the category name. The category I'm posting sometimes has a subcategory now I need to separate this subcategory ...
0
votes
1answer
27 views

Add new post only in assigned category

Is there any possibility or plugin, that alows me to add a user (example author role) who could add posts but only in one category?
1
vote
1answer
27 views

Can't get wp_insert_post to work

I'm trying to code a loop that will post articles from a SQL database. However, whenever I try to load the page I get a 500 error and nothing is showing up in the error logs. Code: <?php define('...
-1
votes
0answers
15 views

How display taxonomy custom values?

I need to get the output as requested below.
0
votes
0answers
8 views

Bulk update post slugs (find and replace all)

Is there a way to bulk update permalinks through the database? I have several 100 posts and all I want to do is replace all "-" to "_" to the permalink. I could just manually update but that's too ...
-2
votes
0answers
19 views

Hoping someone could explain some queries for me

The following queries are considerably slow on my site and I'm hoping someone could explain them to the best of their ability (what they're doing/requesting). SELECT SQL_CALC_FOUND_ROWS wp_posts.ID ...
-1
votes
0answers
26 views

How to add and Save custom field in category box on add or edit post

When the user clicks on Add category link two fields display category name and parent category I want a custom field there on both new or edit post page. Please check the image. Any help will be ...
-4
votes
0answers
23 views

Creating custom functions with wordpress

Can any one help me out with this: how can I write the functions: Write a custom php function in functions.php for salient-child get_event_member_product_url(post_id). In this function, when a post ...
-1
votes
1answer
16 views

Can I get custom post items in select box (dropdown)

I created Custom Post Type. Now I want Custom Post Item in Select Box. Can i display?
0
votes
1answer
31 views

single- and archive- templates not being applied to custom post types, not even after flushing permalinks

As stated in the title, I'm unable to get the archive or single pages of my custom post type to use the correct templates for them. Funny thing is, they worked just fine on my virtual server (WAMP), ...
0
votes
0answers
17 views

Single posts not accessible

On my index page I have created a post loop which right now only displays the post title which also has a permalink function with it, but when I click the title, my browser reloads for some time and ...
0
votes
0answers
6 views

echo term custom taxomomy from id image insert into post

With this code I get all images urls insert into post: preg_match_all( '/<img .*?(?=src)src=\"([^\"]+)\"/si', get_the_content(), $allpics ); foreach($allimages[1] as $images){ $id_images = ...
0
votes
1answer
13 views

Update if post with specific title exists

I am trying to create a post, if it does not exist and update the post by its title if it exists. The title is unique, because its the users username. However, the update functionality does not work. ...