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

learn more… | top users | synonyms (1)

0
votes
1answer
13 views

Creating a simple pagination for custom post type templates

I have custom post post type call 'news' and I am struggling to get it to paginate correctly. I'm looking for a simple prev and next links, not worried about page numbers in the middle. In ...
0
votes
0answers
21 views

Save multiple custom post fields from quick edit

Context: A multiple custom posts and custom fields website. Since the website is rather complex, has a lot of users, a lot of editors and a lot of data, they asked to be able to choose which custom ...
0
votes
1answer
14 views

Custom Post Types and Pre Populated Custom Taxonomies

I'm building a custom post type that relies on three custom taxonomies. I'm registering all the custom posts and tax... using the init action (this works and I can manage the new aspects) ... ...
1
vote
1answer
7 views

Archive filter disappears on no results?

I have been working through this example: http://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/ That a colleague of mine found for creating a simple checkbox-based ...
0
votes
0answers
15 views

Highlight specific menu item when custom post is page

I know that this question was asked many times, but I did not find a really good solution for my problem: I have a custom post type "event" with some categories like "lecture". For each category, I ...
0
votes
2answers
50 views

WordPress custom post type queries

I'm using custom post types and listing them in single-[customposttype].php?type=example <?php if (have_posts()) : while(have_posts()) : the_post();the_content(); endwhile; endif; ?> Now I ...
0
votes
0answers
15 views

custom post type (+ACF fields) don't show up as single page [on hold]

When I go to for example http://vagrant.local/topics/better-coding/ where topics is custom post type and better-coding is post with that post type I get "There are no posts or pages here" this is ...
1
vote
3answers
16 views

Search tags in CPTs

I can't seem to figure out how to include tags in a wordpress search. For example, if I search for 'apple', I would like to get back posts with 'apple' in the title or the content (default wordpress ...
0
votes
1answer
12 views

Programmatically change post visibility on save_post action return a 500

I'm trying to change the post visibility for my custom post type. On the edit.php screen the user can use a custom field to set the post type to normal or extended. That field shall work as ...
0
votes
0answers
10 views

Post Type Archive in the Site Tree [on hold]

I would like to have a custom post type archive - eg people to be under the about section of the site. urls & breadcrumbs would reflect this: /about - all about us. /about/people ...
0
votes
0answers
50 views

Access post_type from url inside media modal window

In the new post screen of a custom post type i.e. wp-admin/post-new.php?post_type=product you click add media button and it brings up the media modal. You can add custom functionality to thise via ...
0
votes
1answer
23 views

get_template_part for custom post type content not working

I have a custom post type of Textorial with necessary template files: textorial-type.php single-textorial.php content-textorial.php The idea is to have a custom layout for the post type and use ...
0
votes
3answers
29 views

Query & the_content() is showing in the header

This post is about two things: All the results of this query are posting to the header of the Page not on the content area as they should. Do you know of a solution as to why this is happening and ...
0
votes
2answers
16 views

Custom Plugin - Query CPT - Display Results

This code is going into a sample Plugin I am creating as a test using CPT and print them to a Page. I have been trying to get print_r() to give me an object. The custom post types are posting - ...
0
votes
1answer
29 views

Render custom taxonomy query as single template

Im developing a "catalogue" plugin using a custom post type and a custom taxonomy. What I want now is to display the custom taxonomy as a single page. That means I if the taxonomy term "Popular Items" ...
0
votes
0answers
17 views

Query posts from multiple post types sorted by overarching menu order

I have three different post types named activity, publication and project. I want all posts from these three post types to appear on one page on my website ordered by an overarching menu position. ...
0
votes
0answers
9 views

Pagination on Custom Post Types filtered Archive Page not working correctly (jumps to the first Post)

This is my Custom Post Type "newyork": add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'newyork', array( 'labels' => array( ...
0
votes
1answer
14 views

Use post in multiple places on a page with multiple posts

I have three custom post types: workouts, news_items, and business_items. I'm trying to display the top (most recent) item from each on the home page and I'm trying to put the featured picture from ...
1
vote
2answers
41 views

Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname

I have a custom post type "news_updates" which I have not given custom tags or categories. I have however created a normal tag (not attached to a custom post type), and assigned it to a particular ...
0
votes
1answer
19 views

get_page_by_title() doesn't retrieve my post

I have a CPT called "patchwork" and I created a post of this type entitled "Patchwork 01". The following code should retrieve this post, but it doesn't. $patchwork = get_page_by_title( 'Patchwork ...
0
votes
1answer
18 views

Multiple archives to display parent and subcategories content

I am developing a plugin with custom types and my problem is that I need to display an archive of a selected subcategory (selected from a parent category) and in the page display some events of that ...
2
votes
2answers
96 views
+100

Custom Post Type as Page parent

So there are a million snippets for how to get pages as parents of custom post types. However, the reverse seems to be questionable. One would think, since everything in WordPress is technically a ...
0
votes
2answers
66 views

Posts in Multiple Columns and Rows with one single loop

I'm pretty new to creating my own theme and I seem to have become stuck and would really appreciate it if someone could help me. I have searched and found snippets of advice but nothing that really ...
0
votes
1answer
11 views

Top level menu position overwrites another entry

From looking at the codex and after using print_r($GLOBALS['menu']; to display the array list of menu items, I see my CPTs listed as 16,17,18,19 in the returned array. 20 is the Pages menu item, ...
0
votes
0answers
19 views

How to add gallery support to a custom post type?

I've created a custom post type. add_action( 'init', 'my_custom_post_type' ); function my_custom_post_type() { register_post_type( 'my_custom_post_type', array( 'labels' => array( ...
0
votes
0answers
16 views

How to display data with pagaination on backend?

I am new with WordPress development so I have no idea how to do this functionality with WordPress. I got one task to display some data from database and have to display records with pagination(Just ...
0
votes
0answers
18 views

Site loads very slow for archive custom post type page

I created a directory website which has a page that displays all the listings (1,005) This page takes VERY long to load. Is there any way to speed this up? Its using a custom post type listing. There ...
1
vote
0answers
26 views

comment_form() not showing on custom post type

I'm using Gravity Forms to create entries from forms, and Gravity View to display these entries on the Front-End. By default, Gravity Forms and Gravity View doesn't have a comment system for the ...
0
votes
0answers
14 views

Converting a checkbox filter for custom fields to a dropdown

I've been scratching my head trying to figure this out for awhile now and was wondering if someone could provide some help. My PHP knowledge isn't the best so I'm working with what I have and it ...
1
vote
1answer
31 views

Custom Post Type with Templates using Meta Boxes?

I have this issue where I need a CPT to have several layout options and use templates. Originally, WP does not support templates for custom posts, however I know its possible to do it manually via ...
0
votes
3answers
48 views

Page not found taxonomy custom post type

I made a custom post type with taxonomies and when I go to the taxonomy page and view one of the taxonomies I get a page not found error like the taxonomy wasnt made. Any suggestions? /*Products*/ ...
0
votes
1answer
15 views

List all Custom Post Type posts excluding certain Taxnomy term

I'm writing a theme in which I've registered "Services" as Custom Post Type that supports "Type of Service" Custom Taxonomy. I want to list all the posts of type "Services" except those which have ...
-2
votes
1answer
23 views

Canot save post if any meta box was empty

I need to dont save new post from custom post type if any meta box empty. So we must check the meta if empty, we mus show me " You must fill all meta box value before save post" else if all meta ...
1
vote
2answers
47 views

How can I show a custom post type for users in the authors.php file?

Here is the code I have. It is showing 100 custom post known as campaigns. I need it to only show the current users. So author/joe should only show joe's campaigns. <?php ...
0
votes
0answers
20 views

Custom meta Title for custom post type archive from page

I've set up some custom post types, and created custom archives, eg in the following format: archive-books.php (With a template name of "Books Template"). I then have a page (/books/) created in ...
0
votes
1answer
22 views

Adding HTML tags or css classes to admin columns

Is it possible to add a custom class to the links in admin columns? I'm trying to replicate the labels below. I'm using WP 4.1 and my CPT is using 'show_admin_column' => true in ...
0
votes
0answers
17 views

Meta box Custom Validation Not working [closed]

In the latest version of Meta Box plugin there is a new 'validation' meta-box argument that allows specifying validation rules and messages using jquery.validate syntax. I tried this for my project. ...
0
votes
1answer
9 views

Plain <a> links in single-class.php and archive-class.php not working

This seems like it should be super-easy to resolve, but it has me stumped. All the links on my page added via get_header() and get_footer() work just fine. The links added via single-class.php and ...
0
votes
1answer
32 views

Changing custom post type URL issue

I have this function and it does just what I need, it replace words in URL perfectly, but links don't work. All links are good and display on site well structured, as I wanted, but just don't open ...
0
votes
1answer
18 views

How can i call a custom method on submission of a custom plugin post type?

I have registered a custom post type .On submission of that page/ post can i call a custom method . How ? Can i add a method in plugin file and will it call on post type submission by ACF or any ...
0
votes
0answers
10 views

custom post types not appearing in Search multiple post types

I have a Search page where users can select to search for multiple post types: posts, pages, docs, newsletter. What is driving me nuts is that: a) Users can select posts/pages OR docs OR ...
0
votes
1answer
20 views

Set the Title of a Custom Post Type by code as Author's Username

For a Custom Post Type I want to have the Title to always be the Authors Username. So far I've: Limited each Author to only posting this type once so as to avoid conflicts. Added code to the theme ...
0
votes
0answers
20 views

Custom meta-box for all custom post types

I want to create a custom meta-box for all custom post types: post, page, and every custom post type (portfolio, testimonials, FAQs, quotes, reviews...). But without writing them into the array: ...
0
votes
1answer
18 views

Conditionally custom post type url rewrite

I am going to try and sum up what I am trying to achieve. I have custom post type named "item" and there are also registered taxonomy named "item_category". I need now to rewrite url, to remove "item" ...
0
votes
1answer
17 views

Custom Taxonomy Query by Taxonomny not working

Not sure what's going on - here's a look at my code: $args = array( 'orderby' => 'title', 'show_posts' => '-1', 'posts_per_page' => '-1', 'cat' => $goalsCat->cat_ID, ...
0
votes
2answers
34 views

Wordpress: insert a custom post type instance as an option for a custom taxonomy

I'm trying to connect a custom post type to a taxonomy defined in an other custom post type. I'll show you an example. I have a custom post type COURSE, i use this post type to create a class for a ...
2
votes
2answers
110 views

Syntax to get the Nth item in a list of custom post types?

We have a custom post type testimonial and want to show the 1st, 2nd and 3rd in various bespoke locations on the page. Here's how we would do it if we just wanted to loop over testimonials and show ...
0
votes
0answers
6 views

Custom posts to exist in only one site in a multisite

Is this possible to do? I imagine this would also exclude said CPT labels from the main CMS dashboard menu too?
0
votes
1answer
26 views

Edit post meta direct from post.php?

Does anyone know of an easy way to be able to edit ALL of a single post's meta at once ie on the post.php &action=edit page? As some of the meta has been put in there with the update_post_meta() ...
0
votes
0answers
8 views

Selecting distinct days from a custom field within a range

I have an events custom post type that stores a date as a custom field named datestart. I need to select the distinct dates in this field, where they fall in a given month, and return those distinct ...