Custom Post Types extend the WordPress back-end to support additional, non-Post content.

learn more… | top users | synonyms (1)

4
votes
1answer
105 views

Wordpress 4.4+ : How to revision CPT + metadata

In WordPress 4.4+, how do you enable revisions for Custom Post Types along with their metadata? How can you get this information to appear in the diff view? I've attempted to implement what was ...
1
vote
3answers
493 views

Custom post type paging 404 error

I've an issue on custom post type, I've create a custom post type called "Agenda" and the rewrite url for http://example.com/agenda it works correctly, it points to the archive-agenda.php template ...
0
votes
1answer
652 views

Showing the custom taxonomy parent term and child term of a post

Is there any way that you can show a custom taxonomy's parent term and child of a post? I'm currently using get_the_term_list() to display the custom tax terms of the post. The only problem is the ...
1
vote
1answer
1k views

Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?

I have a custom post type with a custom taxonomy (to show some "best practice" examples on my website). On the single-post-page (single-bestpractice.php) I wanted to show all the terms (categories) ...
2
votes
1answer
979 views

wp_dropdown_categories in custom post type with custom taxonomy

I have a custom post type with its own taxonomy, basically 'show venues' is the post type and venue-regions is the taxonomy. Seeing how a venue cant exsist in mutiple regions, I've removed the ...
0
votes
0answers
38 views

Omitting the latest entry with custom type and taxonomy term from the loop

My agency has inherited a client with a customized theme provided to them from a separate agency, which farmed the work to another agency off-shore. The documentation for this theme is non-existent ...
0
votes
1answer
17 views

Wordpress add taxonomies/terms list as a menu in archive page

I create a custom post type (deals), terms (project), menu (top_menu) and archive page (archive-deals.php) on my theme. I want to display terms post list in archive page. But when I click terms menu ...
0
votes
1answer
8 views

Problem with adding custom post type meta to header by plugin

I'm trying to write a plugin by which a meta code will be added to specific post type header. I tried to use this code: function msc_header() { if ( is_singular( 'article' ) ) { echo ...
0
votes
1answer
438 views

Dynamically create/remove terms in taxonomy when custom post type is published/trashed

Am struggling a bit with creating & removing terms based on when a custom post type is published and trashed. Ideally, I would like to create a new term in my custom taxonomy when a custom post ...
0
votes
1answer
8 views

conditional based upon the count of current user's published custom posts

I have this conditional snippet that does something is the current user has not published a normal post. But I'd like to change it so that it counts a custom post rather than a normal post. <?php ...
0
votes
1answer
23 views

Custom taxonomy returns 404

I'm getting a 404 page when I visit my custom taxonomy page. Custom taxonomy is called 'manufacturer'. I also have a cpt called 'product'. EDIT 1: It has something to do with the cpt rewrite. If I ...
0
votes
1answer
470 views

Give a unique ID while saving

I have in my theme custom post types (products) with some meta-boxes. My client asked me, to automaticly give a unique SKU (meta-box) while saving that product. My thought: Give a random ID => ...
0
votes
1answer
1k views

add category name to permalinks on product page /category-name/product-name

I'm trying to reconfigure the permalinks used in WooCommerce such that the following format will be displayed: homesite/category/product. Right now, the permalinks only shows under a category page: ...
7
votes
5answers
10k views

Prevent post from being published if custom fields not filled

I have a custom post type Event that contains a starting and ending date/times custom fields (as metaboxes in the post edit screen). I would like to make sure that an Event cannot get published (or ...
0
votes
0answers
10 views

I am trying to sort items in a current taxonomy by taxonomy, then custom post [closed]

The below code is currently listing the articles in menu_order for the current issue, I need the articles to be sorted by taxonomy (issuem_issue_categories) as well. <?php // The Query $defaults = ...
0
votes
0answers
16 views

How to add a pagination in custom post type maker plugin

I declared testimonial using a testimonial page template. I want a pagination in testimonial menu. <div class="testimonial"> <ul> <?php $args = array( "post_type" => ...
0
votes
1answer
633 views

WP-API Custom Post Type json_no_route

I have created a custom post type and extended the WP_JSON_CustomPostType class as in the documentation, I can see the custom type when I go to wp-json/ but as soon as I go into wp-json/quizes it ...
0
votes
0answers
26 views

WP add_rewrite_endpoint - custom post types destroys permalink URL match

I'm trying to implement AMP-versions to Wordpress posts with a custom plugin. The problem I'm having is that we use a bunch of different post types. They all have their own permalink structure. For ...
0
votes
1answer
936 views

Adding post_type to the query via pre_get_posts, with infinite scroll

I'm doing something wrong here. I'm trying to add a custom post type, external-videos, to the main blog query in all instances. It's working in the main blog page for the first load of posts but the ...
0
votes
1answer
518 views

wp_update_post based function works on existing posts, but not new posts

I have a function that will update the title of the post based on an 'advanced custom field'. It works on existing posts, but not when I create a new post. When I try and save the post and check the ...
2
votes
2answers
531 views

Get image URL from media library in input

On wp-admin/post.php?post=447&action=edit for example I have a link and an input. The link appears as follows: <a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
0
votes
2answers
83 views

Removing all post statuses from a Custom Post Type

I have a custom post type and I would like for it to not use any of the default WordPress post statuses, but instead only use the custom ones I create for it. Is there a way to deregister a post ...
0
votes
1answer
440 views

Can't pull posts of a Custom Post Type based on the custom taxonomy of the CPT

My question is about retrieving custom post types via get_posts, when custom post types also have a custom taxonomy. I can use get_posts to retrieve all posts of a custom post type, but when I attempt ...
0
votes
0answers
12 views

Post Notification Function triggering on wrong custom post type

I have a function that triggers an email when a post (any CPT too) goes from draft to publish. The post types I want to use this function for are normal posts and my 'recipe' CPT. When I publish a ...
6
votes
1answer
56 views

Custom Post Types not showing on Custom Taxonomy archive page

I've been working with custom post types for a little while now, but yesterday I took my first stab at a custom taxonomy to pair with them. Here is my 'company' taxonomy: function ...
0
votes
0answers
50 views

Custom post type category pages return 404

I have created a custom post type using the following code and its working but i get a 404 error when accessing the category pages. function services_init() { $args = array( 'label' => ...
1
vote
1answer
25 views

Add predefined/default values to custom post plugin

I have created a custom post plugin. I need to add predefined text/values within this plugin, when adding new custom post. Is it possible to handle these predefined text/values in my plugin PHP ...
0
votes
1answer
29 views

Archive for a Taxonomy of a Custom Post type

I have a situation like this: /disrupt-founders/disrupt-categories/help-me-be-healthier/ What I am wanting to do it create an archive page that is unique for the Taxonomy based on the Custom Post ...
2
votes
2answers
1k views

wp_nav_menu() mark current item ancestor of custom post type

This solution does almost what I want it to. Only thing is, I have my menu set up as follows: Menu item 1 Menu item 2 Custom post type 1 Custom post type 2 Custom post type 3 Menu item 3 ...
10
votes
3answers
1k views

What is singular.php?

From 4.3 we have a new template, singular.php. I tried to understand what is it, but I didn't get it. :) The page.php for pages. The single.php for every post types. If we have single-[post-type].php ...
1
vote
2answers
57 views

Custom Post Type: Upload Multiple Images

So I'm making this Property Listing theme for a client of mine, and on the Properties Custom Post Type (CPT) which I have created I need to add a meta box that allows him to upload multiple pictures - ...
1
vote
1answer
68 views

Custom Post Type Pagination Not Working On Archive Page

I've spent the last 3 hours trying to get pagination to show up on my custom post type archive page. I sort of understand that pagination only works with a default loop and once you modify the loop, ...
0
votes
0answers
31 views

Get Post Custom for Custom Post

I am trying to get the following code to return the gallery slider for the following custom post "advert". function tie_gallery(){ global $post, $tie_blog; if( is_singular() || tie_get_option( ...
0
votes
2answers
55 views

Overriding Plugin Function in Child Theme

I have a plugin and a custom post type class like this. I want to override one its function in my child theme. class Inspiry_Property_Post_Type { /** * Register Property Post Type * @since 1.0.0 ...
0
votes
1answer
875 views

Multiple tag cloud filtering

I am writing a plugin which creates a custom post type and two associated custom taxonomies. The custom post type list/archive page should be filterable by terms in one or both taxonomies i.e not just ...
1
vote
0answers
81 views

how to use two permalinks for one custom post type

I have a custom post type "article" where posts have a permalink structure (www.mysite.com/article/post-name). I need each post in it to have two different templates according to its permalinks: the ...
18
votes
3answers
15k views

Query all posts where a meta key does not exist

I am trying to get a query to retrieve all the posts where a specific meta_key does not exist and then create it. I am having problems finding those posts as the query I am testing does not seem to ...
1
vote
1answer
3k views

How I upload, save and set a featured image from my frontend?

I have a form in my site. This the user register one missing person. I created a custom post type missing person, custom taxonomies and custom fields. All this input's save as well in wp. But I ...
0
votes
1answer
28 views

Custom post type name and assigning custom taxonomy

I've made mistake creating custom post type. I've put: register_post_type( 'Post Name', $args ); instead of register_post_type( 'post_name', $args ); Now I need to assign new custom taxonomy to ...
0
votes
1answer
470 views

Taxonomy Url with Custom post type prefix re-write rule

I have a taxonomy called Section and a Custom post type called Developments. What i need to achieve is a permalink on the taxonomy with custom post type prefixed: e.g: custom post type: development ...
1
vote
3answers
3k views

Getting Bootstrap accordion working in Wordpress loop with custom post type (collapsing issue)

First off I am well aware that there is a plugin but I am NOT talking about the BS Short code plugin. I am talking about the actual bootstrap accordion. So here is what I am trying to accomplish, I am ...
0
votes
0answers
31 views

Subcategory generated based on title of custom post type

This is what I have in my functions to create a category based on the title of a custom post type "attorneys": add_action('save_post', 'add_title_as_category'); function add_title_as_category( ...
1
vote
2answers
2k views

Posts to expire (deleted) after a date

I am creating a coupon site from scratch. I have reviewed many code examples on the Internet, but have not found anything that will work, as my requirements are little different. I need help in ...
1
vote
1answer
1k views

404 - Category pagination for custom post type

--Edit I've managed to narrow it down that the paged variable is not working properly here, (get_query_var('paged')) ? get_query_var('paged') : 1; is always returning 0 although maybe it is due to ...
1
vote
4answers
469 views

Adding help information to custom post edit page

I have two custom post types created (using Types plugin) with a bunch of custom fields. I need to add a help information, instructions for admins that will show at the top of add new/edit CPT page ...
1
vote
1answer
458 views

Display 1 Post per taxonomy with polylang

I am trying to make a loop where I display all my taxonomies with the first post of every taxonomy. It's the taxonomy "customers" and I want to display every first portfolio-CPT of the customer. I ...
0
votes
1answer
629 views

Issue displaying multiple TinyMCE editors with WPAlchemy

I have a custom post type with a WPAlchemy admin meta box class including multiple textareas with TinyMCE editors(for adding content to the custom post template). I've gotten the editors to display ...
1
vote
1answer
22 views

List terms from Custom Taxonomy

I have registered a custom post type "Projects" and also registered a custom taxonomy for that Post Type called "Project Categories". On my home page I have a div in which I would like to list all ...
0
votes
1answer
13 views

Custom Post Type rewrite url to /category/pagetitle [duplicate]

I know this questions has been asked a lot, but after working on it for 6 hours straight I can not find a good solutions anywhere. My site has a Custom Post Type and taxonomy. My taxonomy are for ...
1
vote
2answers
2k views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using ...