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

widget should display post archive by year and on click also by month

I want to display the post archives like seen in this picture. Shown by year and on click it should open up the months. I am not sure how to approach this, would you customize the standard WordPress ...
0
votes
1answer
23 views

Exclude current custom post on single post

I'm trying to exclude the current custom post that is viewed from a list. I've tried with exclude but it still displays it. Here is the code I have on single-works.php: <?php $currentID = ...
0
votes
0answers
99 views

Force update all posts in custom post type, no content changes

I have imported data from a custom post type that has location data for a map plugin (Progress Map). I have about 500+ posts each with different location data. For some reason the location data isn't ...
-1
votes
2answers
91 views

How to create a loop that will display one post and stop?

I am trying to create a part on my wordpress theme that will only display one featured post. I have installed this plugin - https://wordpress.org/plugins/featured-post/ . I know I am supposed to ...
0
votes
1answer
16 views

Wordpress URL question

I have a web page that I created and in doing a google search for the company and my name a weird page came up. For private reasons I will not reveal the company name so I will use a fictitious ...
0
votes
1answer
52 views

Creating widget - ask for selecting a post in the admin panel

First of all, sorry for my English, I'll try to make it understandable. I'm new on WordPress; I already have created a few plugins but they didn't needed admin configuration. Now I'd like to make an ...
0
votes
1answer
57 views

Creating an admin meta box to save post as pending

The workflow when using Wordpress to change a draft post to pending involves several clicks and button presses, especially on mobile So to simplify my process I would like to create a meta box that ...
0
votes
1answer
72 views

Restore woocommerce orders

Recently my server team replaced my database and they put our previous Database . So we lost our order details of one day[particular day] . Now the server team give the backup that contain the lost ...
0
votes
1answer
39 views

add div after image in post [closed]

I want to give my photos a special style such as this link "CSS3 Hover Effects" For this, I must add a div after any image link in any post What should i do For this style ? I am using Hueman Theme ...
1
vote
1answer
56 views

Genesis + Ajax + Jquery | Failling to call action

I want to execute an action, without realoading my page. I folllow this tuto https://codex.wordpress.org/AJAX_in_Plugins But each time my page reloads, and I can't have the result value. Here is my ...
-3
votes
1answer
60 views

hide particular category post from front page only [closed]

i have setup a new wordpress blog and have few categories one is called news and it updates too frequently and less important so I want news category posts to be excluded from my home page only and if ...
0
votes
1answer
89 views

Get post embedded image caption

I am trying to get the caption of post embedded images to then use on a lightbox. This is my code: function my_theme_prefix_content_gallery( $content ) { global $post; $args = array( ...
0
votes
0answers
17 views

Redirecting a Post to a Page Because the Page is More Flexible

Wonder if there is an acceptable way to do this. I am using a theme on this site that allows me a good amount of functionality for pages that isn't there for posts. So, I can create a page and have ...
0
votes
1answer
37 views

How to display all posts assigned to some tag?

I have tag url - example.com/tag/new-shoes and I have 2 posts tagged with those keywords new-shoes. I would like to display on this url example.com/tag/new-shoes all posts (titles and first keywords ...
3
votes
1answer
35 views

Where is the “ancestors” post object attribute?

I usually work with the ancestors attribute of the post object: if ( in_array( $target_id, $post->ancestors ) ) { // do whatever } But while debugging the post object I've seen that there is ...
0
votes
1answer
33 views

How to create a custom page in woocommerce?

I would like to create a blank page, which is used to list out the product by the category , so far I have found some code like this: $args = array( 'post_type' => 'product', '...
0
votes
0answers
21 views

Multiple Custom Post Type loop logic

In short this is what I want to archive: [template body] - default post title - default post body [custom loop | tabs] - tab 1 -- tab 1 title -- tab 1 content --- related articles to tab 1 by ...
0
votes
0answers
37 views

Featured image in custom post is being disabled

I'm trying to create a custom post as a plugin and so far I'm having some trouble trying to enable featured image on my custom post type. Right now I have created two custom post types but the problem ...
0
votes
0answers
19 views

Group posts by month by custom metabox?

is there a way to do this ? August 2009 11 Title of the post of the 11th day of August 15 Title of other post of the 15th day of August 20 Title of another post of the 20th day of August July 2009 4 ...
0
votes
1answer
150 views

Wp_query WooCommerce products

I'm currently developing an e-commerce store using Wordpress and WooCommerce. I'm planning on creating a basic product filtering system and was wondering if it's possible to wp_query the results shown ...
0
votes
0answers
50 views

How to delete a stuck post using phpMyAdmin

I was attempting to change some leftover http:// references in the DB using Update/Set SQL statements. I was getting confident and started doing them in bulk and stopped noting exactly what I was ...
0
votes
2answers
39 views

Display taxonomy term only if there's a value

I have a post type which I want to add some taxonomy values (tags) Example Post Type One City: London, Paris Color: Red, Yellow Language: In the example above, Language doesn't have any value, ...
0
votes
0answers
22 views

Custom Fields with pre-filled content

as this is my first post here I first of all like to say "Thanks" because I found a lot of hints here for my problems in the past. Now I have to ask for the first time: We are offering news under ...
0
votes
2answers
154 views

Filter posts by author and category simultaneously

I'd like to include in my website a feature for users to only see posts from a certain author and a certain category. I'm able to do it separately but I can't seem to understand how to do it ...
1
vote
0answers
14 views

Prevent additional top level categories but allow more children

Is it possible to prevent additional parent categories being added to posts but allow children categories to be added to predefined parent categories? For e.g.; Food & Drink -- Mexican -- ...
1
vote
1answer
107 views

Enabling post thumbnails for custom post type

I'm writing a custom post type as a plugin and trying to figure out how I can enable post thumbnails within plugin documentation/template instead of enabling it in the functions.php. I tried adding ...
0
votes
1answer
28 views

List Authors For Current Category

I want to list all unique authors that have posts in the current category. My code (location: wp-content/themes/custom-theme/category.php) <div class="container"> <div class="row"> ...
0
votes
2answers
86 views

Add “Posted on” to post date

How can I add the words "Posted on" before the post data in a Twentyfourteen theme's post? The default is only to show the date and clock icon. I'm not sure if this is a basic modification or if it's ...
1
vote
1answer
45 views

Getting the current author (it has changed) of a post, not the original author

I'm trying to get the author's avatar, first name and last name and their bio(description). Luckily I found out how to do do just that, using several functions from the WordPress codex. What I'm ...
0
votes
1answer
41 views

How can I filter the post of a CPT by taxonomy Term in admin meta-box dropdown?

I've searched frantically trying to find a solution for this. I'm trying to generate two drop-down fields within one side, Meta Box. The first drop-down field should be populated by the terms of a ...
0
votes
0answers
87 views

Image caption in Magnific Popup for images embedded in a post

I am trying to implement functionality to open my post images with Magnific Popup. I have the following script which works fine: add_filter('the_content', 'my_addlightboxrel'); function ...
0
votes
0answers
26 views

Post title replacement

How do I change many post title only which are in drafts. I need to replace a list of words with another. I'm using latest WordPress version 3.9.2
1
vote
1answer
55 views

how to remove dash (-) post status from post title on posts listing page wordpress

I want to remove post status from post title. E.g Currently on listing page post title comes like "Hello World - Draft" or "ABC - Completed" I don't want - Draft or any other post status. Note* : I ...
0
votes
0answers
40 views

Automatically Paginate Posts after specific number of words

I want to insert <!--nextpage--> (for paginating posts) after a specific number of words, and I want it to keep inserting the tag until the post ends. There is a plugin which does a similar ...
0
votes
2answers
84 views

Auto update post title and slug when post status is changed

I need help. Thanks in advance. I need a function that update post title and slug with some default title + current date when post status is updated from draft to published. I use this one to update ...
0
votes
0answers
22 views

Use audio file like image featured

Attempt to get the url of an audio file in post content to display in the loop of the home page. I can only get it if the file is uploaded at the time of creating the post, but if I go to a post ...
0
votes
1answer
33 views

Worpress search for specific Post Type

I am doing a wordpress site and use a custom post type 'studentinfo'. I want to build a search form and search template that will retrieve only search result from the specific post type studentinfo. ...
0
votes
0answers
24 views

Is there way to update another table when updating wp_posts table?

I have WordPress site with many custom post types. Everyday, nearly 100 posts(posts and custom posts) area created (Some posts are created by different plugins). When a row added to wp_posts table I ...
0
votes
1answer
24 views

How to set class to “current-page” on the currently viewed single post within a CPT

I have a custom post type, "case". I'm currently editing the single-case.php file and in my sidebar I have the following piece of code: <?php $case_query = array ( 'post_type' => 'case', ...
1
vote
1answer
43 views

Need help with category listing!

I'm trying to solve this for a while, but I couldn't get a satisfactory way to get what I want. Maybe it's very simple and I'm just too inexperienced. I need a way to display all the article titles ...
0
votes
1answer
54 views

Show Posts By Custom Field

I’d like to add 2 custom fields to my posts: show_post_on_home_page home_page_posts_order_sequence I then want my home page to show only the posts where show_on_home_page == true, ordered by ...
0
votes
1answer
19 views

trigger email when post is published by someone a user follows

I'm trying to send an email to all users who are following a certain post author when they publish a post. I have this function below, but does not seem to work. a few notes the meta value = '...
0
votes
1answer
34 views

Conflict array_splice on loop and query in widget

I am using the function array_slice to insert two post within the loop in the index. function insert_post_wpse_96347($posts) { global $wp_query; $args = array('meta_key' => 'Caja', 'meta_value'...
0
votes
0answers
15 views

The Loop doesn't work when using RewriteRule

I am using .htaccess RewriteRule on my page. When user goes to /news RewriteRule actually loads /?nav=news On that page, I use The Wordpress Loop to show recent posts if (have_posts()) { ...
0
votes
1answer
60 views

Best Way to detect unique posts in wp rest api

I am developing an android app for my WordPress blog. I have some bad trouble to detect and get post. So first I give u a vision from what I am into: I want to get post from past, so I do this: Get ...
0
votes
1answer
31 views

WP_Query offset argument does not work

I want to display all posts starting from a certain offset, my query is: WP_Query( array( 'posts_per_page' => -1, 'offset' => 20, 'cat' => 5, ) ); ...
3
votes
1answer
93 views

WP_Query: Why is sticky post not first item in loop?

I've got a custom WP_Query loop based of meta_value variables: $meta_cat = get_sub_field('category'); $posts = new WP_Query( array( 'cat' => $meta_cat, 'posts_per_page' => get_sub_field(...
0
votes
1answer
38 views

WP_Query() load selected post

I need to load a selected post in a ajax function, I have some problems writing the appropriate query that calls the post i'm pointing <?php $pb_id = $_POST['post_id']; $pb_details_args = ...
-1
votes
1answer
31 views

Custom post page has attributes of latest post [closed]

When you share the custom post page, it shows title, description, author of latest post. Even page ID is from latest post. Does it supposed to work like that? Besides this, it causes many other ...
0
votes
1answer
62 views

Get query result according to merged array

1st query selecting the records that are found $old_args = array( 'post_type' => 'product', 'meta_query' => array( 'relation' => 'AND', array( 'key' => ...