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

learn more… | top users | synonyms (1)

1
vote
1answer
1k views

Querying custom posts and regular posts

I want to populate the "Greenway News" box on this page with the three latest headlines from the site's Press section AND blog. The blog is a regular WP blog and I am currently using this code to get ...
0
votes
3answers
1k views

Saving Custom Post types and fields to a custom table

I have a project in which I am trying to import a large amount of data into a WordPress installation and from that data, create pages on my site (as a custom post type). Since these pages will be ...
0
votes
0answers
28 views

Display list of Child Custom Post Type into Parent Post

I am trying to display list of child custom post type "report" into parent custom post type titled "List of Weather Reports". I am using the following code: function wpb_list_child_pages() { ...
0
votes
0answers
23 views

How to select a template for displaying custom post type

Hi i know how to implement post types list in any page or template in worpress using code . for example $args = array( 'post_type' => 'home_banner'); $loop = new WP_Query( $args ); while ( ...
0
votes
1answer
727 views

wp_trash_post action hook with custom post type

When a 'contact' cpt post is trashed, i need a metakey from another cpt 'act' to be deleted, i have been searching all over which hook i should use but unfortunatly the codex action reference page is ...
0
votes
0answers
15 views

Post Type with Feature Image + Image from metabox - Catch each a unique way

I have a Custom Post Type and'm using an image metabox (Odin theme metabox class). I need to render loop in the url image bgimg metabox, and Featured image as .... The Contrary I can, however when ...
1
vote
3answers
410 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
2answers
31 views

White screen error for a custom theme

I have created a theme for one of our clients using bootstrap framework! When i was working on it on Localhost it works Correctly, but when I Uploaded it doesn't work. When I Activate it from ...
0
votes
2answers
19 views

Query only current post type using taxonomy

I have several post types "Courses", "Institutes" having same taxonomy "country". I am using this to get term on single-courses.php <?php $terms = get_the_terms( $post->ID , 'country' ); ...
0
votes
1answer
20 views

Wordpress export tool doesn't export post-format value of custom post type?

I already created a custom post type with post-format support declared. register_post_type('portfolio', array( 'labels' => array( 'name' => __('Portfolio', "xxx"), ...
0
votes
1answer
1k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
0answers
7 views

New notion of custom posts subset

I want to create an image voting site. As a user I want to: Create a "Poll" that belongs to some category (custom wizard process) Post an image to any "Poll", mine and thine (limit of 1 post per ...
0
votes
1answer
329 views

rewrite rules hierarchical

I want that my WordPress follow this rules: /productes/ a page with all products /productes/[category]/ a taxonomy-page with all products of the category /productes/[category]/[subcategory]/ a ...
0
votes
1answer
389 views

Warning after create Custom post type with Roots theme

I've created e Custom post type with Roots theme, adding the custom script inside functions.php like require_once locate_template('/lib/custom-post-types.php'); // Custom post types After ...
0
votes
1answer
33 views

How to change post status link order(priority) on cpt listing page

On a custom post type listing page the registered post statuses are listed as links above the post lists. I've a situation where custom registered post types are showing after 'trash' and I still want ...
0
votes
1answer
576 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 ...
0
votes
2answers
32 views

Proper way of making custom post type landing page or archive page

I always run into an issue with creating archive or landing pages for custom post types and wanted to know how others handle this. If I want to have a landing page for a custom post type, however I ...
0
votes
1answer
17 views

CPT and metabox: create multi checkbox by using array?

I have a custom post type to display informations of book. Then I created a metabox for it. And: I need to add a warning system (like: for kid, violent, mature, adult, etc...) chosen by multi ...
0
votes
1answer
23 views

How to convert custom post type based list to a dropdown list?

I have been created a query to list the post from current taxomony, filt by term slug for my book site (as table of content). And it worked very well. But, is there any way to convert it to a dropdown ...
1
vote
3answers
36 views

How to search map address in custom post type?

I built a custom post type "shop" with Custom Post Type UI plugin and added a field "address" (Google Map type) with Advanced Custom Fields plugin. From the response of WP_Query('post_type=shop');, I ...
1
vote
1answer
3k views

How to auto send email when publishing a custom post type?

I'd like to have an email automatically sent out to my website's subscribers when I publish a post for a specific custom post type. I've found a few plugins that will do this but only for regular ...
4
votes
3answers
624 views

List most recent image uploads, but only for specific custom post type

I can get a list of the most recent image attachments like so: $attachments = get_posts( array( 'post_type' => 'attachment', 'posts_per_page' => $number, 'post_mime_type' => ...
0
votes
1answer
405 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
0
votes
0answers
9 views

URL Structure for Custom Page Type with Custom Taxonomy

There are a number of questions here that are similar to what I'm trying to do, but none seem to answer what I'm looking for. I have a custom post type with a rewrite like: 'rewrite' => array( ...
0
votes
1answer
1k views

Custom post type archive page pagination

I have set up an archive page for my custom post type reference, where I use a query to get all posts of type reference. This works, but when I try to paginate the result, it doesn't work. Right now, ...
0
votes
1answer
31 views

Get posts in same category not working

I have a custom post type with custom category taxonomy. On the CPT single templae I want to list out other posts in same categories, but I can't get it to work. My current code: <?php foreach ( ...
0
votes
3answers
1k views

Add multiple custom meta boxes to different custom post types

I want to add one custom meta box to a specific custom meta type "chifres" and two custom meta boxes to a specific custom meta type "presse". This is how far I've gotten: Here is my code: //Add ...
0
votes
0answers
27 views

Restore the “Restore | Delete Permanently” actions for custom post types

So I have a custom post type with no title, therefore I have lost the action bar. This wasn't such an issue for me until I realised when I went to trash I no longer had the "Restore | Delete ...
0
votes
0answers
21 views

Split posts into separate screen on custom post type admin screen

I have a custom post type called 'event' that has a meta_key of event_status with a value of either 'upcoming' or 'past' depending on the event date. I am trying to split all past events into their ...
2
votes
1answer
521 views

Set default custom post type for XML-RPC

So now that it is possible to work with Custom Post Types over XML-RPC, has anyone figured out a way to set the post type for all items coming in via XLM-RPC to a default post type? IFTTT has a ...
0
votes
1answer
352 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( ...
0
votes
0answers
14 views

Rewrite URL of a page which is child of a Custom Post Type

With the plugin Types I've created a hierarchical custom post type "journeys", and then I set that normal "pages" are child of "journeys". I've created a "journeys" post called "My First Journey". ...
0
votes
0answers
13 views

WP Query - Group by relation (custom post type)

I have a custom post type Office. An office has an address, email, ... . An office also has a relation with a custom post type Region. So an Office must have a relation with a relation with one ...
0
votes
0answers
31 views

Problem assigning Custom User Roles to Custom Post Type

I'm having issues assigning custom capabilities for custom post types to custom roles in the WordPress admin. The markup works for one post type but not others. Let me explain a little... I've ...
0
votes
1answer
566 views

wp_dropdown_pages doesn't work with post_type argument

I'm trying to display dropdown menu with posts with custom "post_type". In case I insert this code, it shows dropdown menu with all "pages". $arg=array( 'show_option_none' => __( ...
0
votes
2answers
637 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 ...
0
votes
0answers
33 views

Assistance with complex query based on ACF Post Object Field

I got the following scenario: Two Custom Post Types: Game Bonus Two Custom Taxonomies (Not Hierarchical ): Game-Type (Poker, Roulette, BlackJack, etc') Bonus-Type (Free Credits, Free Spins, ...
0
votes
2answers
20 views

Template for custom taxonomy for custom post type broken

I'm trying to set up my custom template for a custom taxonomy. When I click on a category link to display the custom posts in that specific category, I get the 404 page. My custom post type file name ...
0
votes
0answers
17 views

Dynamic CSS for CPT that requires post meta data

I have an, admittedly weird, CPT structure. I have two CPT's, one is 'section' - which is basically meant to represent a tag in HTML - and the other is 'sectioned_page' - which displays user chosen ...
0
votes
1answer
32 views

How to link to Custom Post Type

I'm trying to create a custom post type, so I cloned the single.php to single-courses.php and I'm trying to link my posts into it, for example: How can I link the permalink to the specific ...
1
vote
2answers
465 views

Pagination on Custom Post Type: 404 Error

I've been getting a 404 error on a CPT archive page, and am not sure why. I can go to the page set for the custom post type archive, but the next page /mycustomposttype/page/2 gets a 404 error. I ...
0
votes
1answer
21 views

Create query for both custom post type and category

I have a custom post type called articles and have category = news I want to make a query from the two parts to get content from (cpt=articles, category=news) in the same query? How can I achieve ...
0
votes
2answers
815 views

Post Type => Any conundrum

I have a number of regular posts and pages in a regular category called "Featured". I have also installed a plugin called "Event Organizer" that creates its own custom post type called "Event" and has ...
0
votes
1answer
357 views

Get categories and descriptions from custom post type

I'm trying to pull all of the categories associated with a custom post type within a loop, but I'm not sure how to get it so automatically pulls all of the categories automatically from the associated ...
0
votes
0answers
26 views

How to get attachment's custom url using custom media uploader

I'm wondering how to retrieve attachments's 'Link To' field when an image is inserted into a custom field using custom media uploader. And here's the code used: var frame = wp.media({ ...
0
votes
0answers
18 views

How to exclude event custom posts if date of event is in the past?

I'm using a theme with a custom post type for events which creates a calendar, ordered by an Event Date specified in the event posts. The theme also uses the Visual Composer plugin to create the page ...
3
votes
3answers
1k views

How to Debug the 'save_post' Action?

Is it possible to validate PHP code? I have a Custom Post Type (Film) with Custom Meta Boxes. Everything is working fine, I can add new Films and details to the Custom Meta Boxes. My problem is ...
0
votes
1answer
34 views

How to Display the tag content of Custom Post?

I have a custom post called "Portfolio" whith the taxonomies: - Categories - Tags (tag clouds) I want to show the Tag content inside the custom post. Thanks.
0
votes
2answers
2k views

Custom post type single page returns 404 error

I have a custom post type called slide. It has content and some custom fields. I want WP to show the single.php theme or single-slide.php theme when the user clicks the slide single page link. the ...
2
votes
2answers
370 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" ...