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

learn more… | top users | synonyms (1)

0
votes
1answer
464 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 ...
1
vote
1answer
415 views

Create template for taxonomy results limited by Custom Post Type

I've got a Custom Post Type with a Custom Taxonomy set up. So how do I create an archive template to display posts from that CPT, limited by taxonomy? Here's the deal: The CPT is called Shows. Each ...
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 ...
0
votes
1answer
638 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 ...
0
votes
0answers
17 views

letting unregistered users edit or delete their custom post type only by password login

Letting the unregistered users editing or deleting their custom post type by password login only from the front end. Therefore, what I need to do is allow unregistered users to set a post password ...
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
22 views

Get number of posts by a user (draft, pending review & published)

I am trying to get the number of posts by a user including all post status (draft, pending review & published). This will be used for a rule. If a user has more than or equal to X number of ...
1
vote
1answer
688 views

How do I alter the position of a Custom Post Type menu item within my plugin admin menu?

I'm writing a plugin (for the first time, so bear with me!) which includes a custom post type; 'Programmes'. In the admin menu, I've set up a new menu group for the plugin, and I have the 'Programmes' ...
1
vote
1answer
48 views

What code should I use to display children of a custom post?

I have a hierarchical custom post type, and on each single view of a post of this type I want to display the title of the children of this post, outside of the loop. The code I'm currently using is ...
-3
votes
2answers
37 views

Adding custom theme template to custom post type

I've created a new custom post type called MemberPost and want it to follow a slightly different template to my main index (which is where main news is kept). I've created a custom post type and ...
-1
votes
2answers
431 views

display all posts in current category

I am trying to display all the content/posts assigned to a certain category. I have a custom post type set up called 'Videos' and within this I have created categories called music, commercial, promo ...
1
vote
2answers
957 views

Wordpress 3.5 Media Uploader - Only allow 1 upload and certain file types

I am trying to include the new WP Media Uploader in a Custom Meta Box. I found this tutorial: http://codestag.com/how-to-use-wordpress-3-5-media-uploader-in-theme-options/ However i am looking for ...
0
votes
0answers
44 views

Add two custom post type. News and Staff

I have installed the Bone Theme for Wordpress and I have successfully setup a custom post type for Staff (post) but when I tried to create another one for News, Wordpress crashed. What is the right ...
1
vote
8answers
5k views

How do I list custom taxonomy terms without the links?

I've searched far and wide to try and find an answer to my question. I'm hoping I can get help here. Here goes... I'm currently retrieving the terms of my custom taxonomy using: <?php echo ...
1
vote
1answer
586 views

Ordering posts by custom taxonomy in admin area

EDIT @kaiser - this question is slightly different to the answer you posted in that I am talking about sorting by clicking the column title rather than adding a dropdown to filter by taxonomy term (...
6
votes
1answer
133 views

Meta_Query as a way how to setup CPT permalinks - is it a good thing?

I'm creating quite complex website for a literary magazine. For its custom post types Issue and Event, I wanted different permalink structure than for posts (which is basic http://example.com/%...
2
votes
4answers
1k views

How to sort list of custom posts to get view like a tree of posts under categories and their children's categories?

I'm new here and my english isn't perfect so I'm sorry for this :) I'm here because I'm workin on site with post list sorted by category and I have problem with sort out my posts in categories and ...
0
votes
1answer
423 views

Loop and add Specific Categories and Products Images

Thanks to Rafael Marques, I have a list of Products and Categories organized based on different created categories. I also have 5 different Custom Page Templates. Now I would like to display the ...
0
votes
0answers
29 views

Custom Page Load by wp_query

Is there a way I can use wp_query to retrieve custom pages and posts, and display them on the front page of my WordPress site? I'd like to do that for every custom page I have, to end up with a one-...
0
votes
0answers
15 views

Title is not retrieving in publishing a post from another post type

Hope someone can help me out. I am trying to setup a website in which whenever, i publish a post, a custom post type also gets published automatically. I have everything working except one issue. The ...
1
vote
2answers
43 views

How do I get the permalink structure to work like this?

domain.com/rents/miami-dade/ domain.com/companies/miami-dade/ Then for, say rents/miami-dade/ I would loop through some different areas within miami, showing a list of rents for each area. For ...
0
votes
1answer
472 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
2answers
1k views

Paginate_links links not working accordingly to how I do query the page

Ok, I've a custom post type page to which I have attached the paginate_links function to navigate through the elements. If I don't do anything and let WP using whatever mechanism is attached to the ...
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 this:...
0
votes
1answer
530 views

Using Custom Post Meta Values in Shortcode

I'm trying to display meta content from a custom post type in a shortcode. I'd like to simply provide a post_id and be able to display all the meta content. [my_shortcode post_id=""] I'm new to PHP ...
0
votes
0answers
27 views

How can I make my CPT read from page-*post-type*.php?

I have a CPT created. I made a page that uses page-upcoming-games.php. I have a query written on there to pull posts from my CPT. The issue I'm having is I have no idea how to make the slug /upcoming-...
0
votes
1answer
37 views

Set a Custom Post Type as a Homepage

Im trying to set up a custom post type single post as a homepage. I have custom plugin, it registers CPT called STACKS, Im using it to build various one page scrolling pages... It has its own custom ...
0
votes
1answer
269 views

Custom Post Type template for homepage

I'm writing a squeeze page plugin and I've hit a bump. The plugin needs to be able to display custom post types with a custom template and also be able to be used for the homepage. So I've got the ...
-1
votes
1answer
43 views

Display div based on Group metabox selection [on hold]

I am having an issue with the below code when it comes to displaying a div based on a specific metabox is filled in. I am using the Group metabox selection from CMB2 to handle my metaboxes. As of ...
0
votes
2answers
2k 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
4k views

Custom post type: can't enable comments by default

I want to enable comments for custom post types just like they are for standard posts, but can't seem to get it to work. In functions.php, as part of registering my custom post type, I have this: '...
0
votes
3answers
425 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
1answer
14 views

I want to link an author to everything from any post type that they publish on the website

I'm trying to create/add a widget to a client's website that lists all non-admin authors and links to their posts. I've been able to do that but one of the authors posts, almost exclusively, using a ...
0
votes
1answer
25 views

adding custom post type “name” to single template

i created a custom post type called 30 day boot camp using this code: add_action( 'init', 'rt_custom_post' ); function rt_custom_post() { register_post_type( '30-day-boot-camp', array( '...
2
votes
1answer
41 views

Create user role restricted to specific CPT

I am trying to create a role that can create and submit to a CPT only. When I take away edit_post from the role, it revokes the ability to create and edit any of the assigned and registered CPTs as ...
0
votes
1answer
26 views

Wordpress get all post with like in terms

I have a wordpress site, which has post and custom taxonomy. I want all post of a particular taxonomy with like query. For example: Table: wp_post post_id 100 Table: term_relationship post_id ...
0
votes
1answer
56 views

Adding second comments.php for reviews

I've just started a business directory website. I'm using a custom post type for this. I'd like to extend the site's purpose by allowing visitors to add reviews on each business. I therefore wondered ...
0
votes
2answers
144 views

I have a custom taxonomy assigned to two post types. How do I create URLs for different term archives for each post type?

I am working on a site for a client and am using a plugin that adds an "event" custom post type and an "event-category" taxonomy. I have also attached the "event-category" taxonomy to the default ...
2
votes
2answers
563 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 ...
-3
votes
0answers
16 views

Create Post Type with CPT UI and show fields from advancedcustomfields-plugin in post template [closed]

I am using the CPT UI plugin and the advancedcustomfields plugin. First, I generated the Post Type "Matratze" with the CPT UI plugin. Here is the export code out of this plugin: {"matratze":{"name"...
15
votes
6answers
8k views

single-{$post_type}-{slug}.php for custom post types

My favorite part of the Wordpress template hierarchy is the ability to quickly create template files for pages by slug, without having to edit the page in Wordpress to select a template. We can ...
0
votes
2answers
494 views

CMB select with data from CPT

I'm using the CMB framework for creating metaboxes (https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress) and I want to add a select box which prepopulates with titles from a custom ...
0
votes
0answers
23 views

Help to fix custom post rewrite + taxonomy. Simple pages show 404

I'm getting 404 for each page. I want to have structure and pages like: url/page-sample url/taxonomy url/taxonomy/custom-post Example of structure (just trying to explain): url/about-us-page url/...
0
votes
1answer
30 views

Theme independent plugin by using default page template

I'm trying to build a plugin that can be used within every theme. It uses a custom post type and i used the action hook to change the content, so i could use extra meta fields and such. Also explained ...
1
vote
0answers
44 views

Searching Custom Post Types

I am trying to create a search template to search attachments uploaded to a custom post type called folders. This is what I have so far: if ( $post->post_type == 'attachment' && $post-...
0
votes
0answers
44 views

multiple url slug for single custom post type

I have created a custom post type for events. Now within events post type I have created 2 categories. One is 'event' and another one is 'workshop'. The 'event' category post url looks like http://...
0
votes
2answers
4k views

Pagination with custom post type not working

For some reason I can'g get pagination using previous_posts_link and next_posts_link working. Here is the code I have... <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>...
0
votes
2answers
43 views

Trying to edit the single page from a Custom Post

I have a custom post type where I can create pages in.("article.php") It automatically uses the template "single.php" when I create a page, although I want to change some things in it without ...
0
votes
2answers
30 views

Cannot obtain custom meta information

I'm trying to access custom meta data from a custom post type called 'Videos' The following code is on a template page called 'single-videos.php' A custom field called 'Video URL', 'Video Width' and ...
0
votes
1answer
1k 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 */ ...