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

learn more… | top users | synonyms (1)

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
42 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
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
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
24 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( '...
-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
1answer
25 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
55 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 ...
-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"...
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
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
0answers
40 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
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
23 views

Adding predefined terms to a taxonomy

I'm writing a plugin for adding a Custom Post called"Dog". The core of the plugin is strictly based on this one https://github.com/RescueThemes/Rescue-Animal-Custom-Posts I prefer to add predefined ...
0
votes
1answer
22 views

How can I generate a list of post-type specific categories?

I'm trying to generate a full list of post categories with links based on post type. So, let's say I'm on an archive page for the custom post type "reports" - when I click on a category link (for ...
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 ...
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 ...
0
votes
0answers
27 views

Subpage template for posts

I have a custom post type, and I created posts. Users can view them at eg: /customposttype/post1 /customposttype/post2 . . Now I want to create a template file to view the posts in a different ...
0
votes
0answers
18 views

Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page

Need some help with some custom rewrite rules. I found this post How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-...
0
votes
0answers
24 views

Using custom query on a custom page for a custom post type

I have setup a custom page (page-mypage.php) and I want to list all posts of a custom post type when I use the loop in my custom page. I'm using pre_get_posts hook to modify the query. Problem: In ...
0
votes
1answer
36 views

Custom Post Type: Show Similar Posts

I have this Custom Post Type that allows the client to enter their own Properties. On a single property page, in the sidebar I have 'Similar Properties' that shows 3 Similar Properties to the property ...
1
vote
0answers
24 views

How to rewrite post slug to prevent adding number

The basic idea to add same slug to different custom posts with different categories: http://example.com/gallery/category-A/postname/ http://example.com/gallery/category-B/postname/ But I'm getting ...
0
votes
1answer
26 views

Permalinks for a custom post type - with a page template (custom query) and taxonomy archive

I'm having trouble getting my permalinks working with a specific custom post type setup. Here's the code for the custom post type: function jc_attactions() { $labels = array( 'name' => '...
3
votes
1answer
40 views

Displaying custom posts only if custom meta box's date is not expired

I have a problem with displaying custom posts - I want each post to show only if a date set in a custom field has not passed. I can't figure out the where I should put the if statement in the code. ...
-2
votes
0answers
25 views

Assigning User Account to Specific Hidden/Protected Post

I am relatively new to wordpress, but have been slowly adapting to it in comparison to Drupal. However, there is one problem that I have been stuck on for awhile now. We have about 100+ items in our ...
2
votes
0answers
25 views

No checkbox in wordpress posts list table for CPT

I have added a Custom Post Type as follows add_action( 'init', 'codex_book_init' ); function codex_book_init() { $args = array( 'description' => __( 'Description.', 'your-plugin-...
6
votes
1answer
132 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/%...
3
votes
1answer
51 views

Right way of storing large number of custom post fields

On one of the sites of my multi-site network; I'm creating a custom post type 'Events'. Each of the 'Events' post will have about 30-50 custom post fields - because we require event creators to enter ...
0
votes
0answers
21 views

Grabbing data from Meta Box

I am using someone elses code for uploading files to a custom post type, and I need to be able to get the URL back from it. In the editor, the value is the URL so that isn't an issue, but I need to ...
0
votes
0answers
11 views

How to create custom bulk action in custom post type [duplicate]

I want to create a custom bulk action in my custom post type named 'voucher' as the edit functionality. I had register the bulk action name in the drop down with following code. add_action('...
0
votes
2answers
34 views

Different taxonomy.php for different custom post types

I have taxonomy.php template file for post_type "posts" but I'd like to use another taxonomy.php but just use/apply it to a custom post type. Is this somehow possible to make another taxonomy.php file ...
0
votes
1answer
23 views

Avoid another meta box in my custom post type

I created my own custom post, all right up here. I have also added the meta box for custom post. But I've noticed that some plugins automatically add their own METABOX my custom post type. This can ...
0
votes
1answer
43 views

get terms that have post with custom post type between 2 values

I have taxonomy terms for Countries and post type for Destination that have many dates for tour. I want to get all terms that have posts width the Custom Filed (Custom field with Advanced custom field ...
0
votes
1answer
38 views

Can't use pagination with custom taxonomy

I have a problem with custom taxonomies & post types URLs. My post type slug is videos, it has an archive and it works fine: https://uwebdesign.ru/videos/. The pagination on the bottom of the ...
0
votes
1answer
27 views

get the custom post type title/name

I'm using a custom post type and use this plugin to display my custom post type's archives, does anyone knows how to display my custom post type's name/title to the archive.php? Below is the archive....
0
votes
0answers
36 views

Creating a custom post template via plugin

I am using advanced custom fields and I am looking for an easy and fast way to create a custom post template. That means, I know in advance that my template might change a lot and I do not want to ...
0
votes
1answer
32 views

Link users to a custom post type

I would like to link a user to a custom post type (college). Does anyone know a good way to do this? The ultimate goal is to display links to view and edit their college I've been using Advanced ...
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
43 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
27 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
40 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
85 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 ...