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

learn more… | top users | synonyms (1)

0
votes
1answer
2k 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
1answer
705 views

All blog posts are not showing up

This post may already exists but I just missed it in how I searched for it. Here goes. I have recently changed my blog back to the Genesis Framework. I am using the Nameless child theme. These are my ...
-2
votes
1answer
70 views

WooCommerce - Complete Order when an action occurs

I'm having trouble with WooCommerce and Custom Post Type/Custom Fields. I have an application where a new WooCommerce order automatically creates a new post (CPT = "audits"). The post has some custom ...
2
votes
2answers
566 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 ...
0
votes
1answer
446 views

Getting ACF relationship field information

I am trying to use ACF Relationships to associate members to different committees. On the front end, I want to have the committee name and the board members that are associated with them. I have ...
-4
votes
0answers
6 views

Collapsible/Expandible articles messing up embedded videos

I am currently working with the Newspaper theme by TagDiv. I would like to make my articles expand. For example, I want my articles to show a snippet of the content with a button that says "Continue ...
0
votes
1answer
795 views

Can you link custom post types to pages?

The reason i ask is because when i create pages they don't insert the usual name of the post type like CPT's do. For example if i create a page called toyota the URL would be http://domain.com/toyota,...
0
votes
0answers
15 views

How to hook save-post function to use taxonomy term in post-slug?

Hook save-post function to check if taxonomy term is attached or not. If attached then, use taxonomy term in post slug like "taxonomy-term-other-words"...
18
votes
5answers
11k views

How to disable the single view for a custom post type?

I created a custom post type: register_post_type('sample_post_type',array( 'labels' => array( 'name' => _x('Sample Posts', 'post type general name'), 'singular_name' => ...
1
vote
1answer
658 views

How to: wordpress job listing and candidates details

I am developing a wordpress site (http://new.saffronresourcing.com/candidates/) where candidates who wants to apply for jobs will be able to upload their cv along with their personal details. I ...
0
votes
1answer
38 views

Making my custom column sortable

I am using custom post type with a relationship field with ACF and trying to get a column of number of times the "location" has been used in posts (this is my custom post type - location). I have ...
1
vote
1answer
32 views

How to retain $_POST data when submitting form to custom page

I have written a plugin whose job is to create a custom page with a user subscription form. The form page is created like this: $page = [ 'post_type' => 'page', ...
0
votes
2answers
47 views

Add a Template to a custom post type

I'm recoding my website with custom post types to be better organized, have a better search experience and being able to hide some pages from other contributors, but I have a little problem. I've set ...
1
vote
2answers
490 views

Bulk edit custom excerpt text in WordPress

Is there a way to bulk edit the custom excerpt text without going to each post and open it? When we have 300 posts it can be a very time consuming process.
2
votes
1answer
589 views

Set default custom post type for XML-RPC

So now that it is possible to work with Custom Post Types over XML-RPC, has anyone figured out a way to set the post type for all items coming in via XLM-RPC to a default post type? IFTTT has a ...
0
votes
3answers
636 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( '...
0
votes
1answer
30 views

Metabox saving values

I have 2 metaboxes ("prices" and "dates") on my custom post type ("kvkoolitus") edit page. As I thought right, wordpress saves values only from first rendered metabox. Each metabox code stored in ...
2
votes
1answer
945 views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
1
vote
2answers
612 views

Custom post type / taxonomy rewrite archive page 2 gives 404

I've followed the code based off this and everything is working perfectly -How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-...
0
votes
0answers
14 views

How to assign Capabilities to custom field

I have created a plugin in in which I have created post types and custom taxonomy and set custom capabilities for this Here is code for post type function create_product() { register_post_type( '...
0
votes
0answers
14 views

Page to display different taxonomy categories

I've set up some custom post types with custom taxonomies. The categories (of the taxonomy) should act like subpages. I'll give you a short setup of my page structure so that everyone knows what I ...
0
votes
1answer
58 views

Database alteration: users who voted

I have a post voting system that stores and displays the vote as an integer. When someone clicks on plus the vote increases by 1, when minus - decreases by 1 (exactly the same way as on this website). ...
1
vote
1answer
508 views

Exclude post by custom meta with pre_get_posts

I'm creating a Custom Post for an event calendar. My Custom Post has 2 custom meta fields called "event_star_date" & "event_end_date". I want to use pre_get_posts to exclude Events which their "...
2
votes
2answers
3k views

Dynamic iCal generator outside/inside wordpress

So following on from this post: http://stackoverflow.com/q/1463480/1086990 I was wondering how exactly it would work integrating it into Wordpress. I have a custom post type setup, and so far I have ...
1
vote
1answer
711 views

Custom Post Types, URL rewrite on multiple CPTs

Re: Custom post types, taxonomies, and permalinks by @TheDeadMechanic The solution above works perfectly, and rewrite is great, but can you advise on how to rewrite for more than one custom post type ...
11
votes
4answers
6k views

Remove slug from custom post type post URLs

It seems that all web resources based on the subject of removing a custom post type slug ie yourdomain.com/CPT-SLUG/post-name are now very outdated solutions often referencing pre WP version 3.5 ...
0
votes
1answer
933 views

Multiple tag cloud filtering

I am writing a plugin which creates a custom post type and two associated custom taxonomies. The custom post type list/archive page should be filterable by terms in one or both taxonomies i.e not just ...
4
votes
3answers
61 views

Add Content to Page without shortcodes

The site I'm working on has a couple of pages that needs to be filled with different content elements like text image combinations, sliders, lists of content, etc. The client would need to re-order ...
0
votes
0answers
30 views

404 custom post type

I've set up some custom post types and wanted to visit the pages but I only get 404 errors. I've searched the web and it seems to be a known problem, but I didn't find a solution that worked for me. ...
8
votes
3answers
4k views

Using save_post to replace the post's title

I am using custom posts, and in these, I don't a need for the title. This causes Wordpress to set the titles of my posts to "Auto Draft". I'd like to change the title's value to something else, ...
0
votes
1answer
30 views

Get posts for custom post type with WP_Query

I'm trying to make a custom post return a query and display but instead it is returning and showing the default/standard post. How do I get posts from my CPT? $query = new WP_Query( array( '...
0
votes
1answer
14 views

I'm trying to create a custom version of the wp_list_authors function that includes custom post types

I'm trying to create a custom version of the wp_list_authors function that includes custom post types. I have 3 authors on the site I'm working on (www.healthyeatingadventure.org). Two of them only ...
0
votes
0answers
24 views

Create a category in shared taxonomy from a CPT title and stop duplication

I'm trying to create an artist directory custom post type. The idea is that when a post is published, it creates a category with the same post title into my chosen taxonomy. I've cobbled together the ...
0
votes
0answers
25 views

Create a Page (Template) based on a URL with other Post-Slugs

We are building a WordPress site based on a theme (Eduma) and a plugin (Learnpress). Nevertheless this question is just indirectly about that plugin, which is why I ask this question here. The plugin ...
1
vote
1answer
953 views

Search Custom Post Type & Taxonomies

The site I'm building has a directory element, which has a lot of different business listings; this is a custom post type. It has a Custom Taxonomy called Trades under which are different types of ...
0
votes
1answer
712 views

Custom post type is showing custom home page, not archive page

I have a custom post type set up (two, actually) that are not displaying properly. I am hoping that it is the same issue with both post types. Here is my code for one of the post types (portfolio). ...
0
votes
0answers
15 views

Use Shortcode to pull specific custom post type into any page

I'm looking for a way to code a shortcode like [shortcode slug="slug-name"] that will pull data from the slugs specific custom post type and fill the variables of my template that I'm attaching or ...
0
votes
1answer
537 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
1
vote
3answers
535 views

Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”

I am trying to display 3 post_thumbnails from a custom post type "portfolio" on my homepage template. So one from post 'A' , one from post 'B' and one from post 'C' The image from post A will be set ...
1
vote
2answers
41 views

When 'is_post_type_archive()' return true?

I visit archive page link http://src.wordpress-develop.dev/2016/ or http://src.wordpress-develop.dev/category/Markup/, on either page is_post_type_archive() return false. I have added ...
0
votes
1answer
483 views

Displaying Page as Custom Post type landing Page

Custom Post-Types are awesome and a PAIN at the same time. Basically, I need to have a landing page, with the list of the direct child elements of the post type (think product categories), but also ...
-2
votes
1answer
48 views

Get Posts ordered by a date custom meta field

I have created a meta field for a custom post type. This is a date field that will always be YYYY-MM-DD. There could be 100s of posts so i cant query them all and sort afterwards. I need to be able to ...
1
vote
3answers
626 views

Unable to get wp_redirect() working after adding a CPT via the front end

I am attempting to learn PHP by creating a relatively simple application built on wordpress, it is a basic CRM and I've made decent progress but have been stuck on some of the finer points. I've been ...
0
votes
2answers
35 views

date_query won't accept day parameter, but will accept month and year for a custom post

I have a frustrating issue. I am using the date_query as referenced in the Codex: <?php $today = getdate(); $args = array( 'post_type' => 'Lighting', 'post_status' => 'publish'...
0
votes
1answer
47 views

How to display wp_post by custom field value?

I am using wooCommerce. How to display posts, when seaching by custom field value. The goal is when ?s={custom_field_value} URL is set, to get a result : ?custom_field*={custom_field_value} And get a ...
1
vote
2answers
1k views

Custom Post Type Taxonomy Filters

Im really struggling to piece this functionality together, and hope someone can help or provide snippets to get me there. So I'm creating a section on a website where stories are published, I have ...
0
votes
2answers
3k views

Conditional two level dropdown filter for custom post type

I have set up a custom post type and taxonomy. The post type is called Local Services and the hierarchical taxonomy is called Regions. The Regions have child categories called Areas. I have set up a ...
0
votes
1answer
63 views

Knowledgebase / Docs: Custom Post Type, Pages or as a Post Category?

I'm trying to decide on how to organize a new site/theme. It has the standard sections: Home, About, Contact, Blog but also an (admin-only editable) Knowledgebase/Documentation area. My first ...
0
votes
1answer
33 views

Custom post type archive page not working

I am trying to create a custom post type. All are working fine except archive page. My custom post type archive page is archive-courses.php but is is not working it is showing default archive.php . Is ...
0
votes
1answer
2k views

Use menus with anchors

I have a CPT archive page and I want to create a navigation menu which will jump to anchors in the form <a name="post-slug" http="{the permalink goes here}>The CPT Title</a> I have been ...