Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
2answers
12 views

Custom Post Type and Custom Taxonomy not connected

I am using the following code to create a Custom Post Type and a Custom Taxonomy: // Register Post Type add_action( 'init', 'cptui_register_my_cpt_resource' ); function ...
0
votes
0answers
20 views

Recent Posts Widget to display Custom Post types doesn't display content

I have created a few custom post types on my site (WP 4.0 / TwentyTen Child Theme) and I was hoping to create widgets to display them on the sidebar. The custom post types work well but the widget ...
0
votes
2answers
66 views

How to get a list of term names of the custom post type im currently on in single.php

Ok so I have a custom post type of "Products" and a custom taxonomy of "Types". Now in the types taxonomy I have dozens of categories and sub categories assigned to custom post types. Custom Post ...
2
votes
1answer
78 views

Custom query - alternate posts by category

I have a custom post type called "services" with a custom taxonomy called "location". Each post is categorized as either "Location A" or "Location B". I need to query all posts from the "services" ...
0
votes
0answers
37 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
2answers
32 views

Get posts by category name

I'm having a terrible time trying to figure this out. I've registered a custom taxonomy (clinical-programs) and like to list all the PAGES that are assigned to particular page(s).
0
votes
2answers
69 views

Cant get paginations on single.php to work with my custom post types

I'm using custom post types and custom fields plugins for my custom post types. I have all other paginations working smoothly on my website except for my single.php. I have a custom post type of ...
0
votes
1answer
22 views

How can I make custom static widgets/areas on my homepage?

I'd like 2 areas on my homepage which will be static but can be editable with tinyMCE or whatever editor WP uses instead of hardcoding HTML in the Widget editing area. What would be a way I can go ...
0
votes
1answer
25 views

query multiple taxonomies

I have a function set up to show 'Similar Products', i.e. showing products that share the same products-category taxonomy term. This works great but I want to narrow the function even further and make ...
0
votes
1answer
20 views

Custom Post Type & Page Template

I have a custom post type : add_action('init', 'dossierinfo_register'); function dossierinfo_register() { register_post_type( 'dossier' , array( 'label' => __('Dossiers'), ...
0
votes
1answer
29 views

Custom Post Type - Admin Columns

I'm getting these 0's in front of my categories and tags: https://www.dropbox.com/s/7v9hvf25wsw15p8/Screenshot%202014-11-08%2020.50.02.png?dl=0 Here's what the code in function looks like: // Work ...
0
votes
1answer
30 views

add_meta_box Callback not being called

I created my first plugin last week that makes a custom post type. As this worked, I copy pasted the code I already had and modified it to be a different post type. For whatever reason however, the ...
0
votes
1answer
33 views

Price comparison table based on Custom Post Type?

I have created a review site where clients can rate their hosting providers based on various factors, however since the launch, many have asked if it would be possible to create a price comparison ...
0
votes
1answer
18 views

Limit taxonomy terms added to a custom post type

I've created a Custom Post Type and a Custom Taxonomy. In WP Admin, how can I limit amount of taxonomy terms that are added to the custom post type? I want to add no more than one tag into the post. ...
0
votes
0answers
40 views

Some questions regarding post-types and pagination

I've built my own theme from scratch using the HTML5 Blank Framework My problems started when I added 3 differen post-types; Work, 50mm and Findings. I've hided the standard 'Posts' type, so that I ...
0
votes
2answers
20 views

Custom meta box in custom post type not working

As a wordpress newbie I am having problems in adding custom meta box in my "slider" custom post type which I used in some old wp theme. I'm getting a warning: Warning: call_user_func() expects ...
0
votes
2answers
22 views

Adding class to featured image

I have specified a loop to show featured images for my custom post type and wish to add a img-responsive class from bootstrap to my featured image. How can I do this? Thanks! Code: <div ...
0
votes
0answers
30 views

query and paginate multiple post types

I'm looking to query multiple post types and paginate them so the results are across multiple pages. The markup I have is as follows: <?php query_posts( array( 'posts_per_page' => 100, ...
0
votes
1answer
24 views

How to limit what Editors see in the admin?

I have a site with a bunch of custom post types, and a few plugins. I would like it so that editors ONLY have access to see posts when they visit a site. Does anyone know of how I can do that? I ...
1
vote
1answer
104 views

WP Admin default view mode for Custom Post Type

To change it globally to excerpt for every post type I can use: function my_default_posts_list_mode( $default ) { return 'excerpt'; } add_filter( 'default-posts-list-mode', ...
0
votes
1answer
20 views

Query custom post type and showing its content

I am a newbie in developing wp themes and having troubles showing my cpt. I added new cpt in my functions.php file: // Creates Testimonials Custom Post Type function testimonials_init() { $args ...
0
votes
0answers
9 views

Custom Rewrite Tag Structure

I am pondering over this intriguing question and I have yet to find an answer. I need to add my own Custom Structure Tags for my cpts. Extract fromt he link above: %year% The year of the post, ...
0
votes
2answers
27 views

What is the best way for showing a grid of customer logos?

I'm speaking about the frequent "our customers" section, usually a grid of customer logos that link to their respective websites/success case posts. The site owner should be able to add or remove ...
2
votes
2answers
66 views

How to hook into the CPT's title placeholder?

I want to change the default placeholder text in my Custom Post Type title field. This isn't possible while registering a new post type. The following screenshot describes it.
0
votes
0answers
16 views

Get list of registered custom post types

How can i get a list of all custom post types registered and show them on any template page. I have code like this. <?php /** * Template Name: Custom Post Types List */ ...
0
votes
2answers
31 views

ascending order custom post type

I'm trying to sort a custom post type in ascending order (instead of the default descending). Registering the post type like so: function codex_custom_init() { register_post_type( 'calendar', ...
1
vote
0answers
18 views

Deleting taxonomy terms and relationships on a custom post_type when a user is deleted

First off, I have a custom plugin that registers a custom post_type. When a user signs up on the site, a post is created using the custom post_type. The post is populated by the user's company name ...
1
vote
1answer
59 views

How to make post sticky in the admin page?

i work with restaurant plugin that use custom post type. the question is, if it possible to select some post and make him sticky (always be in the top) in the admin? i need this because when you add ...
0
votes
3answers
47 views

Categorise Custom Post Types

I don't want to add the category support for the posts of a certain custom post type but to categorize the post types itself. How is that possible? Story behind: In my theme I handle different post ...
0
votes
0answers
21 views

Add Custom Field to Custom Post RSS

I have a custom post type called "Podcasts" with a custom field called "podcast." The custom field is generated by the Advanced Custom Field plugin. I am trying to figure out how to hook the feed up ...
0
votes
1answer
23 views

Simple term-archive-linked Taxonomy Entry output

I've registered a Taxonomy named "type" and linked it to the Custom-Post-Type "group". I simply want to output term archive-linked entrys of the Taxonomy "type".
0
votes
1answer
40 views

Set Default Option Value as Blank for Meta Box

My custom Meta Box has a drop down field, but how do I set the default Option Value to be blank? It is currently populating via the CPT's meta_value, but I'd like that to change. Here's a screenshot ...
0
votes
0answers
18 views

Custom Fields of a custom post within a category list within a page

I need to construct a page containing a list of categories that include a number of posts. Each post has a set of Custom fields that need to be displayed. The hitch: Posts should be selectively ...
0
votes
1answer
65 views

tax_query showing no results

I'm creating a music database site with two custom post types: tracks and albums. I've linked the tracks to their respective albums with a custom taxonomy for the album's slug. On each album page, I'm ...
0
votes
0answers
27 views

Custom Post Types and rewrite rules - One CPT works and a cloned one doesn't

I have two Custom Post Types in my plugin and have a custom single-{cpt}.php file for each in my theme. Each page grabs the content from a specific wordpress post. The first 'house' post works but the ...
1
vote
1answer
43 views

Display only post types that are direct children of the current taxonomy

I have a hieratical category structure using Taxonomies, with a custom post displayed within them. Currently the higher level categories display all the posts that are in their child categories. How ...
0
votes
1answer
28 views

How do populate a column when listing custom posts?

I've created a custom post type. I want to customize what the user sees when browsing posts of this type. I've added a column with this function: function stb_replace_title($columns) { ...
0
votes
1answer
41 views

Add theme options to custom post type admin pages

I have custom post types set up using CCTM plugin and I'm using the Bridge Theme by Qode. The theme adds options to the posts and pages admin (custom theme options, title area, header etc.), I'm ...
0
votes
1answer
38 views

Custom Post type is being ignored in query

I have a custom post type called "results" and on my single results page I want to perform a second query after the main loop. The second query is as follows: $myquery = new WP_Query(array( ...
1
vote
1answer
18 views

Admin Custom Meta Box - Pull Last 5 Posts from Custom Post Type

This is what I'm trying to accomplish, I have a custom post type of "demos", from here I can add custom CSS/HTML/JS to display a demonstration (online preview) of what it is I have designed/coded. ...
0
votes
3answers
183 views

URL rewrite and navigation structure for wordpress custom post type

I have created the following custom post types: Artists Albums Songs Songs are children of Albums, Albums are children of Artists. I am trying to set up a navigation structure that shows this ...
0
votes
1answer
32 views

How would you associate location data with a post?

I'm just wondering how you would associate several addresses to a post. My first guess is to create a custom post type with custom fields, then make an API call to Google Maps for the long and lat, ...
0
votes
0answers
30 views

register_post_type, add_meta_box, add_rewrite_rule

I'm working on custom post type with some custom fields setup using add_meta_box. register_post_type("sample"); add_meta_box("sample_type"); add_meta_box("sample_brand"); I want to get it working ...
0
votes
2answers
29 views

Custom Post Type Fields

I am very interested in creating a coupon plugin for Wordpress, where many of the existing options do not meet my current needs. I have build the core plugin and it is working as expected now so I ...
0
votes
1answer
21 views

Update custom post type title

I want to update the post meta of a custom post type when a user updates the custom post type's title in the admin backend. Something like the pseudo code below; if ((get_the_title() !== ...
0
votes
2answers
51 views

Custom Post type as Taxonomy

I have a custom post type "issue" and relationship with custom post type "article". What I want is, to create the issue cpt as a taxonomy for the article cpt, and showing it in article post list. When ...
0
votes
0answers
24 views

Trouble with custom post type archive on multisite install

I have a problem with a post type archive on a multisite install. When try to access it on one of the sites I end up getting a 404. Checking the url shows the following, all other sites work without ...
0
votes
1answer
32 views

Custom Post Type causes Page Not Found

I found a basic tutorial online which gave the rundown on how to create a plugin from scratch and sets up a new custom post type. I could not find any basic coupon plugins that accomplished what I ...
0
votes
0answers
39 views

Custom post type empty slug breaks permalinks for pages

In attempt to avoid posting a ticket to essentially reopen #15082 I'm posing here first. I have been vigorously dealing with this CPT permalink rewrite for countless hours now. After a 3am kinda night ...
1
vote
1answer
54 views

Mq translate plugin custom post type issue

I am using a http://sitemile.com/products/wordpress-pricerr-theme/ theme. I use mqtranslate plugin to translate my site in two language english and chinese. Mqtranslate allows the admin to create ...