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

learn more… | top users | synonyms (1)

0
votes
0answers
33 views

Custom Post Type & Post Meta or Custom Table for Serial Number Delivery Project

I've trawled a ton of articles here, on wordpress.org, makeuseof.com, code.tutsplus.com, etc. - all very informative but I'm still not sure whether to use a custom table with my plugin project or not. ...
1
vote
1answer
96 views

Single page template for custom post_type

I registered a custom post type with the following code: #Register custom post type for Stars of the Month add_action( 'init', 'sdp_create_star_type' ); function sdp_create_star_type() { ...
0
votes
2answers
39 views

Re-using single CPT code with get_template_part?

Wordpress newbie, here. I've created a custom post type, using CPT UI, named "menus". Later created single instances of that "menus" CPT, directed by a "single-menu" template. So here's my hierarchy ...
0
votes
0answers
35 views

custom taxonomies are not showing up in get_taxonomies

I've made several taxonomies through the custom post type ui manager but i am not able to call them with get_taxonomies and my get_terms is not working either. Is there something I have to do after ...
2
votes
1answer
75 views

Order Posts by Taxonomy and Meta Value

It's possible to order posts by Meta Value. It's possible to order posts by more than one value. And thanks to the code below it's possible to order by taxonomy. But how can I alter the code below ...
0
votes
1answer
56 views

Custom post type capability type 'page' not working

I'm trying to create a custom post type that's supposed to be used for a publication issue -> article structure. Since the hierarchical structure is really only meant for pages (refer to hierarchical ...
0
votes
2answers
20 views

Linking from CPT page to taxonomy.php

I created a CPT which allows the user to add people to the page. I have already created a page template for displaying all people. This page also displays all categories used for people. My problem: ...
0
votes
1answer
18 views

“Cannot redeclare cpt_reg_tax()” because of functions.php

Background: I have a childtheme folder of my Wordpress theme which contains a functions.php. In this functions.php, at the beginning, I wrote code for setting up a custom post type that allows the ...
0
votes
1answer
14 views

Delete link on single-custom.php with redirection

I need to provide a delete link for my users on the single page of a custom post type. But when the entry is deleted the user will end in a nothing found on this page wordpress error (because we are ...
0
votes
1answer
33 views

Group list of posts by taxonomy and allow for pagination

There are multiple ways of showing a list of (custom) posts by taxonomy, but none appear to allow for pagination. So, I can easily list all posts like: Page 1 1 2 3 4 5 Page 2 6 7 8 9 10 ...
1
vote
1answer
45 views

How to get attached file in wordpress from custom post

I am using the Download monitor plugin I am listing the posts by category the following way $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); <?php ...
1
vote
1answer
100 views

wp_insert_term doesn't work with custom post type's taxonomy

Here is the problem I am having: I have a custom post type called "weddingguests" This custom post type "weddingguests" has a custom taxonomy, "friendsof", hierarchic I want to programmatically ...
0
votes
1answer
24 views

How can I create a custom shortcode that will return a custom post type by ID?

Please excuse my ignorance, this seems simple but I can't figure it out and I've been rushing to hack things together. I can't find anything online to help me out. What I have: A custom post type ...
0
votes
1answer
78 views

WP_Query and two custom fields returns no posts

Having trouble with WP_Query returning no posts when filtering on two custom fields, although testing for each custom field individually works perfectly. After reviewing documentation for custom field ...
0
votes
1answer
43 views

URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php

I have a custom post type with a URL permalink rewrite that seems to work if it uses /mynews/stories/YYYY/mm/story-name but if I change "mm" to the first 3 letters of the month (eg Jan, Feb, Mar, ...
2
votes
0answers
50 views

Column sorting with emtpy meta values

I am trying to sort my custom post type columns in the admin area. There's two ways I found to do this: At first this was my way to do it, however I got some strange behaviours. If a meta value is ...
0
votes
1answer
18 views

Hierarchical Custom Post Types

I would like to have the following taxonomy structure: site.com/courses/course-name/pathway/pathway-name The domain is such that any particular course can be completed by taking a number of ...
0
votes
0answers
24 views

Post author for revision not being set on update/insert

I'm trying to programmatically update a custom-type post with revisions enabled via form, and everything seems to be working fine except the post_author field for the revision is being set to 0 ...
0
votes
1answer
72 views

Custom post type Featured Image popup not working

I added a custom post type with thumbnail support. When I navigate to the custom post type in the admin backend and add a new one, I can add a featured image. The problem is, when I click the link ...
0
votes
0answers
60 views

Jquery/Ajax+taxonomy filter?

I need to create a filter it doesn't really matter wether it's JS/Jquery or Ajax I just think Jquery/Js would be easiest. Either way this is my situation. I have a few custom taxonomies and custom ...
0
votes
1answer
27 views

Foreach loop returning more than one item when querying taxonomy

I am querying the taxonomy terms and then listing the posts that are under those terms. The taxonomy is basically a category for a custom post type, and the terms in it are the categories. I didn't ...
0
votes
0answers
29 views

Display posts from category in page

I am trying to use a shortcode to display a loop of posts from a category. I have the shortcode working but it is only displaying the actually category names within the custom post type and not the ...
2
votes
1answer
63 views

How to show custom post type count in the users admin page

There's a post count in the user page of the WordPress admin area. I have a custom post type events. Is there some hook I can use to add my event count to the post count, or else to add a column for ...
0
votes
0answers
31 views

page slug and taxonomy slug in custom post type url

I have a strange situation here. I want the taxonomy of a custom post type to be after a page slug, for example I have a taxonomy term "shareholders", i want the url to be ...
0
votes
4answers
58 views

Use Pages for Custom Post Type

I have a custom post type I am generating in functions.php. I would like each post to be a page, rather than a post. How can I change this? I tried changing 'capability_type' => 'post' to ...
0
votes
1answer
15 views

Query shopp categories and CPT

I have a slider setup that is querying shopp categories that have products here: http://halliescomet.com/ Here's my code: <div class="flexslider-holder"> <div ...
0
votes
3answers
87 views

Custom Query With Multiple Meta Key Value

I am new with WordPress development and I have found this query and I want pass multiple key and value in this query. My Query is: $querydetails = " SELECT wposts.* FROM $wpdb->posts ...
0
votes
0answers
42 views

Parent cpt/child custom post type URL permalink relationship

I am attempting to set up a relationship in Wordpress between two custom post types I’ve created and display that relationship within each post type’s permalink URL structure. I have created two ...
0
votes
0answers
33 views

Is it possible to rename an url from custom post type?

On my test site: http://outletdokkum.nl/kollum/dagaanbiedingen/y-bike-2/ You see a week offers (weekaanbiedingen in dutch). But as you can see the url says Day offers (Dagaanbiedingen in dutch). ...
0
votes
1answer
22 views

insert a taxonomy for a custom post type

I have been created a custom post type and create a taxonomy for it, below is the code which i used to create those: //create custom post type of jobs add_action( 'init', 'create_jobs' ); function ...
0
votes
1answer
18 views

Ordering custom post type by custom field without a title

My custom posts don't have a title, rather they rely on custom fields, and all the solutions I've tried so far seem to work if the title is present. <?php $paged = (get_query_var('paged')) ? ...
0
votes
1answer
18 views

Custom post type rewrite with_front

What I'm setting up, I thought would be quite simple. In fact, I'm sort of amazed that the answer didn't just pop up after a half hour of searching here. Here is the code to create my CPT: ...
1
vote
1answer
52 views

Custom Postype specific changes in admin panel

I have this small bit of code which does exactly what I need. But I want to limit its use to one Custom Post Type (CPT) only. add_filter('sanitize_title', 'my_custome_slug'); function ...
0
votes
0answers
9 views

Pagination on custom post type with 2 wp_queries [duplicate]

Im trying to get my pagination on a page that lists all custom post types working. I have tried both the bones theme next/prev as well as the default wordpress option, to no avail. This is the two ...
0
votes
1answer
45 views

Sort a custom post type loop by a custom taxomomy instead of chronologically

I simply want to list out the books (a custom post type) organized by their respective genre (the taxonomy made with the code below). I have all the code being used listed below. I am using the ...
0
votes
0answers
25 views

Dynamically generate custom post type title from category

I have a custom post type named "event", for which i disabled the title field. This results in the post to be automatically named "Auto Draft" and the slug "auto-draft-x" How can i automatically ...
0
votes
0answers
33 views

Multisite: How to define and limit a Custom Post Type to specific sites?

I have 2 sites on a Multisite network: A) Primary.com B) Secondary.com The primary site has a custom post type called, "primary_site_employees." I do not want the Secondary site to have access to ...
0
votes
0answers
18 views

Cannot save post meta data as Administrator in Wordpress

I have an wordpress installation at yogazoga.com with several custom post types. When i try to add meta data to posts through admin panel it simply does not work. See the post at: ...
0
votes
0answers
42 views

Populate WYSIWYG field with ACF choice

So, I have a custom post type that uses a flexible content field containing a post object field and a wysiwyg field. The post object is to choose a post from a selected post type. After you choose ...
0
votes
1answer
16 views

Return the name of the post type

I have this in the archive.php file of my theme: <?php else : ?> <h1 class="archive-title"><?php printf( __( get_post_type() ) ); ?></h1> <?php endif; ?> And it ...
0
votes
0answers
31 views

previous_posts_link returns null when querying custom post type

I have created a custom post type named lesson, and I want to display all lessons, so I created a custom page named lesson.php, inside, I added a query to look for all the posts which type are lesson. ...
1
vote
2answers
75 views

Custom post type and taxonomy permalinks

I have a custom post type 'news' and a taxonomy 'category-news'. I would like to get this permalinks: www.domain.com/news -------------> list of all news www.domain.com/news/sport ...
0
votes
1answer
33 views

Get custom posts with certain ids in a custom loop using a shortcode

So I'm using custom loop and shortcode to insert it in any page. Like this: function register_custom_shortcode($atts){ extract(shortcode_atts(array( 'ids' => '', // this is what I ...
0
votes
2answers
45 views

How to query for posts (in hierarchical custom post type) that have children?

I'm trying to figure out how to query for posts in my hierarchical custom post type, presumably using WP_Query that have child posts. I can get all pages that don't have children by setting ...
0
votes
1answer
38 views

custom taxonomy listing returns no posts

I had a issue with a custom taxonomy and a custom post type using the same url and that is now fixed but it has created another bug. not showing the posts tagged with the custom taxonomy. my url i am ...
2
votes
0answers
103 views

Custom media upload content for inserting custom post shortcode

I’m working on a plugin that creates custom post type “portfolio” along with shortcode to insert in any page or post. The shortcode is: [portfolio option1=“1” option2=“0” option3=“1” ] And it works ...
0
votes
1answer
28 views

Change Custom Post Type singular_name through function/filter

I'm working on e-commerce site using woocommerce plugin. My client will be selling tickets online. woocommerce plugin creates custom post type "Product". I want to change this cpt singular_name to ...
0
votes
1answer
35 views

Custom Taxonomy with Custom Post Type Finds No Posts

I've created a custom post type named mfg_ppn and a custom taxonomy called mfg_pp, and they are referenced as $this->cpt_promotion_newsand $this->cpt_promotionin case you were wondering about ...
0
votes
1answer
18 views

I cant access custom taxonomy page listing

I had a issue with a custom taxonomy and a custom post type using the same url. my url i am using for my post type is /news and then i have a taxonomy which i need to have /news/cars I followed this ...
6
votes
4answers
142 views

Are custom post types lost when the theme is changed?

I am about to begin work on a custom WordPress theme and I want to know how careful I have to be about custom posts. Suppose I create a WordPress theme that registers several custom post types. To ...