Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
1answer
17 views

post_type_exists keeps returning false

I have a little helper class for registering new custom post types. However, it seems it is registering the custom post type on each page load. I put in a small check for this: if( ! ...
0
votes
0answers
25 views

Custom Post Type URL

I have big problems get the result with my custom post type and taxonomy I have made. I have read a lot in the questions and tried also many, but don't know where to find the solution or where to ...
0
votes
1answer
14 views

Custom taxonomy (categories) on custom post type return no results

Hi everybody and thanks in advance for helping. I am experiencing a problem with the categories I have created for my custom post type: when I click on the URL of the category (every category) I get ...
0
votes
0answers
9 views

I need to change my wordpress permalink structure to mysite.com/taxonomy/post_type/post_title

I have three post types like post_type1, post_type2, post_type3, which are having same taxonomy "region" now i need my permalink structure like mysite.com/region_name ...
1
vote
0answers
8 views

Add custom post type drafts to RSS feed

I have an RSS feed setup for my custom post types, but I'm trying to add in all posts with the status 'draft'. Here's what I've tried that doesn't seem to be working at the moment : function ...
0
votes
1answer
20 views

How can I remove the “Add New” button in my custom post type?

I have many custom post types that need the Add [custom post type] feature but I have a custom post type of "About" and I do not need to "Add New" about to the about custom post type. So I want to ...
0
votes
1answer
33 views

How to filter post data with AJAX on page?

I have build a custom post_type with "Work items" in order to enter my personal portfolio items. The "Work items" have taxonomies like "Graphics", "Websites" etc. I am able to display them all in an ...
0
votes
0answers
11 views

custom post types menu

I am wanting to create an accordion menu of states and cities that are defined in a custom post type. The cities are defined in a custom field of the post type and the states can also be a custom ...
-1
votes
1answer
23 views

Custom Post Type Loop inside Array

I current have a custom post type loop: $args = array( 'post_type' => 'locations', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : ...
0
votes
0answers
18 views

How to avoid hardcoded text in a custom page template?

I'm developing a company Website using Wordpress 4. This website needs some special, customized pages - with forms and GET and POST and a lot of stuff, so a lot of PHP code. Now, a CMS' main purpose ...
0
votes
1answer
13 views

How to query all custom posts of a certain type and checking what category they have

Here's what I have: Custom Post type: Vendors Vendor categories: Wedding Party Catering I want to query all Vendors and then assign them a class based on the category they are in. The class ...
0
votes
0answers
5 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
0answers
8 views

How to add a new menu item in “Twenty fourteen” theme?

I've created two menus inside of my theme's functions.php file: register_nav_menus( array( 'primary' => __( 'Top primary menu', 'twentyfourteen' ), 'secondary' => __( 'Secondary menu in ...
0
votes
0answers
11 views

Native Category taxonomy used with multiple post types show wrong numbers of posts attached to it

I have two custom post types i.e. Deals and Articles and both have native category attached to them. I then created multiple Deals and attached different categories to it. It all worked fine and ...
0
votes
1answer
26 views

How do I show my <p> containing my custom field ONLY if there is a set value on that custom field?

I am using the Custom Fields Plugin and have 2 custom fields assigned to my "products" custom post type. Field 1. Price Field 2 Discount Price So this is my code: <div class="wrapper"> ...
0
votes
0answers
24 views

WP_Query by a category id and a custom post_type

I need to query all posts that belong to a given category (default, not custom) and a custom post type. As simple as that. The fact that it doesn't work, to me, is ridiculous. Unless I'm missing ...
0
votes
1answer
9 views

How to create user groups and allow custom posts and plugin modify/access to specific group?

I am looking for plugin or is there any method/function to create user groups and give an access them to modify/access.
0
votes
0answers
22 views

Query stopped working

The following code stopped working, not entering the while loop at all although there exist 'staff' posts. How can I start trying to find out what's going on? Only think that's changed I think is I ...
0
votes
1answer
10 views

admin_head-post.php only works after publish / update

I have made a custom post type with some admin back-end. Currently I am calling scripts using the hook admin_head-post.php but this only seems to fire once a custom-post type has been created (on ...
0
votes
0answers
29 views

Multiple post types

I'm using the "Types" plugin for Wordpress to create two custom post types and it works fine. I built custom templates on the base of archive-slug.php where the "slug" is the post type slug. It ...
0
votes
1answer
36 views

Exclude categories For Custom post types

I have category 1, category 2, category 3, to category 7 and custom post types Gallery, Article, Front Row.. How can we restrict the admin to choose the category for custom post type Gallery to Cat ...
0
votes
1answer
20 views

How to allow a custom user role to create, edit, delete a specific custom post type only?

I created a custom post type called Traveller Post using the following code snippet: /* custom post - traveller posts */ add_action( 'init', 'traveller' ); function traveller() { ...
0
votes
0answers
15 views

Assign posts (CPTs) automatically to certain subpages

my next website has this structure: Home (Page) Departments (Page) Department A News (Page with Custom Post Type) Events (Page with Custom Post Type) About (Page) Department B (see ...
0
votes
0answers
21 views

Custom post type slug rewrite blocks pagination - how to solve this?

I have run into a problem while doing what was given as a solution in the following thread: Remove Slug from Custom Post Type Namely, after all of this being done, my pagination no longer works. As ...
0
votes
3answers
24 views

Template to list categories in custom taxonomy

I refer to this post where I have just taken my code from: How to display a listing template of a certain taxonomy? I am trying to create a page template that will list all categories in ...
0
votes
1answer
28 views

Permalink of custom post type partly broken

I'm running into some issues while working with a custom post type (CPT). The problem is that the permalinks of the CPT are fine for a single post but not for the archive/overview page. The website ...
0
votes
1answer
26 views

Displaying different custom post types under one admin menu

I am creating multiple custom post types that have hierarchies, and a few of them are strongly related like a parent-child. For example, a house custom post type has bedroom and kitchen custom post ...
0
votes
1answer
35 views

shopping cart plugin development

I'm developing a new shopping cart plugin for WordPress. At a point, how to save orders, I am stuck, sort of confused. Actually I am not sure whether I should save order through options api or create ...
0
votes
1answer
19 views

Create category only for custom post type

All, I'm creating my own post type using the following code: add_action( 'init', 'create_team_post_type' ); function create_team_post_type() { register_post_type( 'team', array( 'labels' ...
0
votes
0answers
14 views

Post Editor: display categories from current post type taxonomy only?

I have a custom post type and a related taxonomy which is called "Asset_Type": Which is perfect. However, if I create a post with the default Wp Post type, I still seem them as categories: I'd ...
0
votes
0answers
8 views

Custom post type search shows “Not unique table/alias” error

If I search for a value on the page that shows the custom post type list ( edit.php?post_type=my_post_type ) then it returns normal results. But because I wanted to include the post meta fields in ...
0
votes
0answers
9 views

Managing a tracking ID

I'm looking for advice on being able to create a custom tracking section within a wordpress site. In it's most simple form, the website will offer a service that users will be able to buy and then ...
0
votes
0answers
23 views

Linking custom post categories and post categories

I am using Posts 2 Posts which links between my posts and custom post types on a single page. For example I have a post about printing business cards and a coupon (custom post type) displayed in the ...
0
votes
0answers
14 views

Hierarchical relationships with different custom taxonomies [duplicate]

I have a custom post type: Cars and two custom taxonomies: Makes and Models. I already created a front-end post submit form using those three elements but as you may imagine from the title, I want to ...
0
votes
1answer
18 views

Prevent custom taxonomy from being added to admin menu?

I have several custom post types, which share two custom taxonomies (location and service). The custom taxonomies show up in each post type menu, and it just seems a little redundant. My client isn't ...
0
votes
0answers
40 views

Help paginating custom loop

i'm trying to add some sort of "load more" button every X posts in this loop: <?php if(is_home()) : ?> <section class="pages clearfix"> <div ...
0
votes
2answers
25 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
1answer
39 views

WordPress custom post type archive with description

I have a common design pattern I'm not entirely sure how to best execute in WordPress. The layout is a listing of post teasers (title, trimmed body, image) on an overview page. Let's say example.com ...
0
votes
1answer
24 views

Modifying rewrite rules to use <custom post type>/category/<custom taxonomy term>/

I know I can add a rewrite rule to accomplish this but I'd like to affect the links generated by WordPress (such as when I put a custom taxonomy term into a menu) I have spent the entire day today ...
0
votes
0answers
23 views

Multi WP Query Problem

im using seprate multi wp query loop but first query cant return my values . anyone can help me ? $first_product = $_GET['first-product']; global $post,$wp_query; ...
0
votes
1answer
26 views

Custom post type with new taxonomy [duplicate]

I have a CPT called "products" so in the menu on the left there is "products" and "add new", I want to have "product categories" within the menu too so that the user can add as many product categories ...
0
votes
0answers
17 views

Capabilities of a Custom Post Type and et_post_type_capabilities()

I created a custom post type item, and gave it custom-named capabilities as below. function register_custom_post_types() { $args = array( 'labels' => array( 'name' => ...
0
votes
0answers
20 views

Call_user_func_array() expects a valid callback, function does not exist. How to write function/where? [closed]

Alright, so this is my first question so bare with me with the bad formatting. I'm very new to WordPress development, and I'm trying to create a custom post type for the admin sidebar. However when I ...
0
votes
0answers
12 views

Make a custom permalink for a specific category

I would like to make 1 post and check off 2 categories, say cat1 and cat2. I want cat1 to spit out my post like this : site.com/past-name Then cat2 to spit out the same post like this : ...
0
votes
1answer
23 views

Post query missing an elseif statement

I have a custom post type query which currently successfully returns tbe posts requested in the order specified. I would like to add an 'elseif' statement if there are no posts but am having ...
-1
votes
0answers
17 views

Taxonomy in Custom post type permalink [duplicate]

I work with Wordpress a lot of the time but I am still yet to understand how advanced permalinks work especially ones that may involve using custom fields and taxonomy. I have read so much about these ...
0
votes
0answers
27 views

Sort by meta_key

I want to sort products by height, but some of my products like accessories don't contain height section and they're automatically disappear when I sort by height. Is it possible to sort by height ...
0
votes
0answers
21 views

very simple event post type

What I want to achieve is to have an extremely easy and minimalistic event management on my WP page. I have already a post category called Events. I need only to add to that a nice two fields: date ...
0
votes
2answers
16 views

Echo post count of CPT with current taxonomy

I have a CPT called 'Athlete' and a Taxonomy called 'School'. Two sample terms have been added called 'term1' and 'term2'. When a user views the archive for any of the 2 terms (taxonomy-school.php), ...
0
votes
0answers
17 views

Wordpress Custom Post type child page 404 page not found error?

I am having custom post type articles and when I try to display the child page it gives me 404 page not found error. I tried to display the request variable display first the post type articles with ...