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

learn more… | top users | synonyms (1)

0
votes
1answer
40 views

How to keep a CPT stick to specific position?

I have created a CPT (esp-publicitarios) using Metabox plugin with the following code: add_filter('rwmb_meta_boxes', 'elclarin_register_meta_boxes'); function elclarin_register_meta_boxes($...
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-...
-1
votes
0answers
13 views

Changing custom post type slug messed up translations

I've been trying to change custom post type slug from "services" to "products" the post is registered through a plugin that is bundled with the theme. I went to file of the plugin and change the ...
0
votes
0answers
28 views

Problem in defining custom permalink for custom post type

I have created a custom post type i.e. Movie of The Year by the following code. class Twenty_Fifteen_Post_Type_With_Rewrite { private $post_type; private $query_var; private $...
1
vote
2answers
42 views

Custom Post Type Post have a Child `Page` Post Type Post

Oddly enough I can't seem to find anyone asking this question exactly in this fashion. Is it at possible to make a page be a child of a CPT? In a repeatable fashion (see below for more info) n.b. I ...
-2
votes
2answers
36 views

show the most recent date of all posts to display on front end

Is there any way to show the date that the last post (most recent) from my custom post type was created? I want to have my site show the last time a list of products was updated and i figured that it ...
7
votes
1answer
70 views

Why are comments and trackbacks still getting through for custom post types?

We have a site where we don't want comments or trackbacks. We've done the following to disable trackbacks: In Settings > Discussion, unchecked "Allow link notifications from other blogs (pingbacks ...
1
vote
2answers
87 views

how to set default value for checkbox in wordpress

I am facing a problem to set default value for the checkbox field in WordPress. I have a checkbox input field (metabox) in a custom post. I want the checkbox to be checked by default. and if user ...
0
votes
0answers
11 views

Gallery Meta box not showing on single post

I want t replicate a Tour module into restaurant, not much gud in development so have created a Custom Post Type "Restaurant". It has same features as "tour" have but i get stuck when a Gallery meta ...
0
votes
0answers
27 views

Custom post type archive option

I have a custom post type of 'channel', within which there's different channels - all of which have parent/children relationships for geographically-oriented sub-channels. I want an archive (using a ...
-2
votes
0answers
29 views

Custom post type use defaut toxonomy blog category and post_tag

I register a new custom post type. I decided to use default category and post_tag of blog for it. 'taxonomies' => array( 'category', 'post_tag' ), However, I don't know how to get ...
2
votes
0answers
32 views

Number of pages - multiple (custom) post types

My archive query contains a custom posts_per_page, order, orderby, post_type and paged (via wp-pageNavi). array ( 'order' => 'DESC', 'orderby' => 'title', 'paged' => 1, '...
0
votes
0answers
19 views

Password protecting a CPT using custom fields for password (not the 'wordpress way')

I need to password protect a CPT but I don't want to use the default wordpress option for this. My CPT has two custom fields for storing a password, 'client-password' and 'guest-password'. Based on ...
1
vote
2answers
43 views

How to determine if custom post type showing on archive templates

Is there any way to determine if a particular custom post type will be displayed on default archive pages or search results? e.g. Given a post type named (badly) books, is there a way to tell via ...
-1
votes
1answer
30 views

how insert how many post type in this function?

I have two type post and i want display both in tag. this function i can insert one post type, how insert two post type in this function function post_type_tags_fix($request) { if ( isset($...
-1
votes
0answers
30 views

Cannot save Meta Data in custom post

I am trying to wrap my head around Wordpress, and am really sturggling to understand how to save custom data. I have tried so many different ways, I have forgotten what I have even tried. // Custom ...
4
votes
2answers
117 views

Load custom posts with same tag as page

I'm using this plugin to add tags for a page: http://wordpress.org/extend/plugins/post-tags-and-categories-for-pages/ And I've added tags support for the custom post: function codex_custom_init() { ...
0
votes
1answer
46 views

Exclude latest post from WP_Query taxonomy term loop

Any help would be greatly appreciated! I have a Custom Post Type 'video', with a taxonomy 'tax-video' and I'm looping through posts in the sub-taxonomy term 't-o-t-w'. I need to exclude the latest/...
0
votes
0answers
29 views

Can a specific cpt and normal page exist within the same virtual directory?

I've created a cpt of 'channel' (with a slug of 'channels'), and new posts add/display as expected. But an existing normal page at /channels/, which contains a 'we have multiple channels' intro/...
0
votes
2answers
20 views

Displaying custom posts in categories

I have created a custom post type "brochures" which i am currently displaying with the code below (using ACF to display the brochure file). At the moment this displays all the brochures individually. ...
1
vote
1answer
34 views

If 1st / 2nd / 3rd level custom page?

I have a custom post type that is hierarchical. I have 3 level of pages, I need a way to detect whether I am on the top level, 2nd level or 3rd level. I've looked into this and can only find examples ...
1
vote
0answers
86 views

Get custom post type's fields in a while loop as variables

I'm working on a page that shows the name of a lot of products (custom post type), and when the user clicks on the name he can see some product information. It's something like this: Main page with ...
0
votes
0answers
34 views

How do I modify CPT titles?

New to CPTs, I've an issue with the titles of some I've just created. My blog posts are within /notes/ and so the CPTs have 'with_front' => false' for the slug. But the titles are prepended by '...
0
votes
0answers
15 views

On update, set post status to 'draft'

In my website I have created a custom post type named "Activities". A certain user group is able to add/edit these posts. I'd like to set the post type to "draft" each time a user (not administrator) ...
0
votes
0answers
24 views

How to add New Post On clicking a button?

I have a custom post type name guide_tutorial.As I add new post It creates a button name Add Pointer.On clicking the Add pointer button its open a popup which have details about pointer .Now I want ...
0
votes
0answers
16 views

Not Able to Get Custom Post Type in Single and Single-custom-post-type

I have a custom post type called projectsCPT and I am able to display them on page-projectsCPT.php <?php /* Template Name: Projects */ get_header(); ?> <div class="container" style="...
2
votes
1answer
25 views

single-{post_type}.php is not loaded despite flushing rules

I have the following code to define my producto custom type post: add_action('init', 'custom_post_producto'); function custom_post_producto() { $args = array( "label" => '...
0
votes
0answers
24 views

How to hide a post until its prerequisites are complete

I have two custom post types Exercises and Tempo Submissions. For each exercise, I have a field that contains an array of other exercises that are it's prerequisites. I also have an exercise field ...
3
votes
1answer
46 views

WordPress calls archive page instead of Custom Page Template

I have created a custom post type called "Projects". My permalinks settings is postname and I'd like to keep it that way. I created a page template named projects.php (Template Name: Projects) and ...
0
votes
1answer
35 views

Get posts of an specific term of a custom taxonomy

I'm new at Wordpress development and I was wondering (and trying to solve this) for a long time, so maybe you can help me. My WP use a custom post type named Products. And there is a custom taxonomy ...
0
votes
0answers
14 views

Table showing data from posts

I have set up a custom post type, with several custom fields to store individual pieces of data. Is there a way to display the data from the posts in a table? Ideally I'd be able to implement search ...
2
votes
0answers
37 views

has_term or in_category for Custom Post Types

I have property as a custom post type. I want to display a specific message if the property is in the sold category. To do that, I'm using the function below: if ( has_term('sold', 'category')) { ?&...
4
votes
1answer
64 views

Include post id[s] into WP_Query()

I'm assigning some posts to some users whom are not the author of those posts. Typically private posts are visible only to the post authors. So, if the author has 3 posts, on his logged in edit.php ...
0
votes
1answer
31 views

How to handle single entries of a custom post type?

I have a custom post type called Projects. It contains a text-area "project description" and a repeater image field. I know that I can use the function WP_Query to return an array containing all my ...
1
vote
1answer
29 views

Populate dropdown from one custom post type inside another custom post type

[Solved -> see last comment in this question] In custom post type CPT_A I am saving first_name and last_name via a custom metabox form field (they are not taxonomies): update_post_meta( $post_id, '...
1
vote
1answer
25 views

Can't get order_by meta_value_num to work properly

This query is working ALMOST as intended, but for some reason I can't get it to order by the custom field opl_submission_tempo. That field is set up to be a number, so I'm not sure where I went wrong ...
0
votes
0answers
24 views

Adding Angular JS code snippets to pages?

I need to create a post type where an editor can insert 2 code blocks: one for "live" Angular JS HTML markup, and one for a pretty-printed sample of the code (which may or may not be the same code). ...
0
votes
2answers
66 views

WP_Query return highest number only

I have a custom post type with the fields Exercise and Tempo. Here is an example of how that might look: Exercise 1 - 100 Exercise 2 - 104 Exercise 3 - 96 Exercise 1 - 104 Exercise 2 - 110 Exercise 3 ...
0
votes
1answer
27 views

wp_get_post_terms on custom post type with custom taxonomies returning an empty array

I am trying to get the taxonomy values associated with my custom post types. I have a function which fetches a post ($object)'s taxonomies, then cycles through the taxonomies and gets the values for ...
0
votes
0answers
43 views

Rewrite URL/Slug for a Page using a particular page template using Advanced Custom Fields Post Object

Edited 5/20 -- Rewrote to specify my question: I have a Custom Post Type represented as mysite.com/projects/{project-name}/. I'm trying to set up a rewrite rule for Pages that use a particular page ...
0
votes
0answers
9 views

Display nested taxonomies with current class

I have a Wordpress site with a Products custom post type (I'm not using Woocommerce as it is not an ecommerce site). The custom post type has taxonomies with 2 levels (top-level categories and sub-...
0
votes
0answers
8 views

Same Permalinks for Custom Post Types and Category Taxonomy

I am trying to figure out how it is possible to use the default WordPress Category taxonomy across my entire WordPress site, including three custom post types that I have defined. I would like to ...
0
votes
1answer
34 views

Show one item per category of a custom post type

I'm having a custom type called portfolio with different categories. I want to display all my categories except one. I only want to show one item per category on my page. I'm been busting my butt on ...
0
votes
0answers
15 views

Having to flush_rewrite_rules() everytime I make custom post type

I keep running into this issue where every time I make a new custom post type, I have to flush_rewrite_rules() for it to have a single.php or I get 404 when I go to view the post. Anyone have an idea ...
4
votes
0answers
24 views

Adding a drag and drop re-ordering from a custom post type default list

I have custom post type named 'slider_to_be_ordered' and has the following arguments enabled: 'supports' => array( 'title', 'page-attributes' ), 'hierarchical' => true, ...
0
votes
0answers
17 views

sub categories and products that are directly assigned to main category not displaying

I have a scenario in which i have a side bar. In side bar all the main categories are displayed. There are also some sub categories that are assigned to main categories. Now i want to display both sub ...
0
votes
0answers
25 views

Create Sub-Pages for Custom Post Type with Advanced Custom Fields

I have a Custom Post Type called "Projects". I have a archive-projects.php that displays all of the projects. Then a single-projects.php to display a single project. Trouble is, I want the display for ...
0
votes
1answer
11 views

How to register rows (resource) from custom table as posts of custom type on-the-fly?

How can i have wordpress create "virtual" pages (or probably better suited: a different custom post type) taken from a DB Query? The table in question could map out one resource (events in my case) ...
0
votes
0answers
19 views

Taxonomies not display the content

I create a custom post and a page to post a specific content. My functions.php: add_action( 'init', 'create_post_fotos' ); function create_post_fotos() { register_post_type( 'Fotos', array( ...
0
votes
0answers
15 views

Transfer custom post nav (prev/next) from one to another theme

I bought two themes and just want to assume a special next/prev post navigation from the first theme in the second theme. I've searched the theme files and found the function, which declares this ...