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

learn more… | top users | synonyms (1)

1
vote
1answer
21 views

Admin Custom Meta Box - Pull Last 5 Posts from Custom Post Type

This is what I'm trying to accomplish, I have a custom post type of "demos", from here I can add custom CSS/HTML/JS to display a demonstration (online preview) of what it is I have designed/coded. ...
0
votes
3answers
230 views

URL rewrite and navigation structure for wordpress custom post type

I have created the following custom post types: Artists Albums Songs Songs are children of Albums, Albums are children of Artists. I am trying to set up a navigation structure that shows this ...
0
votes
1answer
36 views

How would you associate location data with a post?

I'm just wondering how you would associate several addresses to a post. My first guess is to create a custom post type with custom fields, then make an API call to Google Maps for the long and lat, ...
0
votes
0answers
35 views

register_post_type, add_meta_box, add_rewrite_rule

I'm working on custom post type with some custom fields setup using add_meta_box. register_post_type("sample"); add_meta_box("sample_type"); add_meta_box("sample_brand"); I want to get it working ...
0
votes
2answers
36 views

Custom Post Type Fields

I am very interested in creating a coupon plugin for Wordpress, where many of the existing options do not meet my current needs. I have build the core plugin and it is working as expected now so I ...
0
votes
1answer
27 views

Update custom post type title

I want to update the post meta of a custom post type when a user updates the custom post type's title in the admin backend. Something like the pseudo code below; if ((get_the_title() !== ...
0
votes
2answers
52 views

Custom Post type as Taxonomy

I have a custom post type "issue" and relationship with custom post type "article". What I want is, to create the issue cpt as a taxonomy for the article cpt, and showing it in article post list. When ...
0
votes
0answers
28 views

Trouble with custom post type archive on multisite install

I have a problem with a post type archive on a multisite install. When try to access it on one of the sites I end up getting a 404. Checking the url shows the following, all other sites work without ...
0
votes
1answer
43 views

Custom Post Type causes Page Not Found

I found a basic tutorial online which gave the rundown on how to create a plugin from scratch and sets up a new custom post type. I could not find any basic coupon plugins that accomplished what I ...
0
votes
0answers
63 views

Custom post type empty slug breaks permalinks for pages

In attempt to avoid posting a ticket to essentially reopen #15082 I'm posing here first. I have been vigorously dealing with this CPT permalink rewrite for countless hours now. After a 3am kinda night ...
1
vote
1answer
123 views

Mq translate plugin custom post type issue

I am using a http://sitemile.com/products/wordpress-pricerr-theme/ theme. I use mqtranslate plugin to translate my site in two language english and chinese. Mqtranslate allows the admin to create ...
0
votes
3answers
35 views

Custom-Post-Type - how can I get the only post by IDnumber?

I´m a PHP noop and I want to get the post from a post_type with a specifically ID(for example 64), and than only this.. For Example if there are 3 posts in my post_type (ID 63, ID 64, ID 65) than ...
0
votes
1answer
63 views

wp_set_object_terms() is not replacing term, but creating a new one

From a custom Submenu Page if I use a hard code like: $post_id = 111; $flightCategory = array( 25 ); wp_set_object_terms( $post_id, $flightCategory, 'flight_categories' ); And refresh the page, it ...
0
votes
0answers
31 views

Add different meta box based on taxonomy

i created a plugin with a custom post type. I added a new custom taxonomy also under that post type . How can i add the meta boxes based on different taxonomy. if( is_object_in_term('', 'name of ...
0
votes
1answer
97 views

Jetpack Infinite Scroll won't fire [closed]

I have carefully followed the instructions at OttoPress, and read all the documentation at Jetpack.me. I feel like I understand what should work, but for some reason Infinite Scroll is not firing. I ...
0
votes
1answer
22 views

Get theme URL without printing result

I have this code to create a custom post type, but when I display an icon for this post type, it prints the theme URL: 'menu_icon' => ''.bloginfo('stylesheet_directory').'/images/home-20.png', I ...
1
vote
1answer
28 views

Prevent Google from indexing custom post types?

I am using custom post types to add certain sections to my website. These post types are not meant to be treated like a blog, it's basically just an easy way for me to give the client access to ...
0
votes
0answers
136 views

Archive page for a custom post type using WPML

On a website using WPML in last version, I have a Custom Post Type using an archive page, called archive-agenda.php. CPT is defined with this code : register_post_type('agenda', array( 'label' ...
0
votes
1answer
19 views

Page listing Custom Posts

I have Custom Posts (actually Pages) that I can view on my default page (page-home.php) but how do I create a separate page, with the exact same content, and link to it? The page-home.php (the ...
0
votes
1answer
25 views

Moving meta boxes in admin

I have added tags to my custom post type and by default the tag meta box appears under the 'publish' meta box on the right. I can manually drag the meta box to reposition it under the rest of my meta ...
1
vote
0answers
27 views

Different Custom Post Types for each Network site

I have a WP Network of two sites to use the Multilingual Press plugin ("Site-A" and "Site-B"). They both have a Custom Post Type, say "CPT-A", which I registered manually in functions.php. How do I ...
0
votes
1answer
41 views

Custom post type archive pagination with HTML5Blank theme?

Can't get the pagination to work. Here's my archive-work.php: <?php get_header(); ?> <main role="main"> <!-- section --> <section> ...
0
votes
1answer
79 views

Edit Permalink Structure For Custom Post Type or Modify .htaccess?

I've been trying to find a solution for days now and I am absolutely stumped. I am putting together a website to list my domain portfolio for sale and I'm using a plugin I purchased to lists the ...
0
votes
0answers
33 views

WordPress Custom File upload meta box saving 0 bytes as File size

I am trying to save custom images with the custom post type , so i added a custom meta box for file upload . it seems it is working fine but when i upload any file it save the file size is 0 Bytes . I ...
0
votes
0answers
36 views

archive.php can't find categorized posts

I keep getting the "Oops, post not found!" error message when I try and view all posts from a specific category. I think the issue is stemming from the fact that I'm actually using Custom Pages with ...
0
votes
1answer
26 views

pre_get_posts not firing at all

I'm trying to add a custom post type into the seach facility so that it searches those posts as well as the pages on a site. I have seen the pre_get_posts function and have it set up like the below ...
0
votes
1answer
65 views

Query Posts, order by meta value

I've read a lot, tried a lot more, but can't get what I want: I have custom post types, which I want to order in DESC, orderby its meta value: The complete query with its arguments: ...
0
votes
0answers
54 views

Link (by categories) to the first and last posts in custom post type

Link (by categories) to the first and last posts in custom post type For a new theme, I created a “story” custom post type. The main content has a different style than the blogging part, with ...
0
votes
1answer
44 views

Is a custom post type considred a plugin?

I am reading up on custom post types and taxonomies. I am new to Wordpress development, and just trying to get a firm grasp on custom post types. Upon creating a custom post type: <?php /* Plugin ...
0
votes
0answers
38 views

How to create a petition like form based on custom post types?

I'm trying to make a "petition" like function for a WordPress theme but I'm out of ideas. Basically, here's what I try to achieve: Create a custom post type Creating a form so people can submit ...
0
votes
1answer
30 views

post_per_page ignored in WP_Query

I have a custom post type named 'album' and I added two custom fields 'release_date' and 'release_date_us' with the ACF plugin. I'm trying to display the latest albums based in a widget area. The ...
0
votes
1answer
31 views

the_title not working

I'm using the_title() to show the title of a custom post type, but it's not working; the title does not show. get_header(); $wp_query = new WP_Query(); $wp_query -> ...
0
votes
1answer
18 views

Custom Post Type Archive Not Showing Posts

I'm trying to create a custom post type "Press" with an archive. I think I've done everything needed, yet when I go to /press url, no posts are showing up. I entered "test" in my archive-press.php, ...
0
votes
1answer
63 views

Multiple wp_editor instances in custom post type using Ajax

In a custom metabox, I need to generate a tinny wysiwyg wp_editor everytime we click on a button.. I struggled a lot with this and couldn't achieve it. The js $.ajax({ url: ajaxurl, data: ...
0
votes
3answers
76 views

wrong template for page of archive

I am trying to add pagination to the archiveof my custom post type. Right now it is structured by year & month and I want to add pagination and I fail miserably. So its like this: <!-- ...
0
votes
1answer
50 views

category__in not working on custom post type

Can't get my WP_Query loop to work, cannot figure out why category__in won't work. Just want to pull certain categories FROM my custom post type $args = array( 'post_type' => 'bbt', ...
1
vote
1answer
34 views

How can I dynamically add a post to a custom post type which uses a custom field?

I have a custom post type called "patients". I was using only the post title, but now I need to make a relationship with users. I made this by creating a custom post field (created by ACF), a ...
0
votes
0answers
16 views

Custom Post Type Hierarchy and URL

I am utilizing the standard post and making them a person so I'll have a URL like the following: website.com/person-nam I want to create a custom post type so the user can create their own posts and ...
0
votes
0answers
70 views

How can get Custom Posts Sort by Hour

I need to show posts from 00:00:00 AM to 00:00:00 PM, and orderby day too. How can i do that? Look the following code: $programasQuery = new WP_Query(array( "post_type" ...
0
votes
1answer
48 views

WordPress show custom post type on homepage

How do I display custom post type in homepage? This is my custom code: // Add the Meta Box - Resorts function add_custom_meta_box() { add_meta_box( 'custom_meta_box', // $id ...
0
votes
1answer
51 views

Custom Post Type Custom Archive Page Not Working

I've created a custom post type and taxonomy for a portfolio loop: // Portfolio CPT function portfolio_cpt() { $labels = array( 'name' => _x( 'Potfolio Items', 'post type ...
0
votes
0answers
46 views

WP_Meta_Query object with conditionals

I have a custom post type (Books) that is connected with a second custom post type (People). The Books CPT has an additional author meta box that if checked, it should appear on the additional People ...
0
votes
1answer
44 views

Custom post type table

I am creating a web application and I am using Wordpress as the back-end to take care of the database. Wordpress has all the functions I require. This is not related to blogging or posting posts. ...
1
vote
2answers
59 views

Get the ID after WP_Query

I used WP_Query to find posts of a certain criteria and loop through them performing actions. I grabbed the post id in the loop and assigned it to a variable $i to perform functions on. Before the ...
0
votes
0answers
32 views

Custom Post Type Meta Box Content Showing In Search Results

When I search my site it doesn't seem to pick up the content I have in my custom post type meta boxes. This is the code for some of the meta boxes in my function.php file. // Add the Course Meta ...
1
vote
1answer
72 views

Multiple custom post type loops in category.php

I have multiple custom posts types that use the same category taxonomy. Let's call the CPT's 'venue' and 'story', and say we have categorised each of them as 'foo'. I already have the following code ...
0
votes
0answers
78 views

Issue on Counting CPT's Under Taxonomy Term

I am using this code to count number of Custom Post Type $tax_terms = get_terms($tax, $args); foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . ...
0
votes
0answers
63 views

Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update

am using this code to create a Metabox for CPT. Now I am able to view the updateded / saved Text input on post but the Checkbox and selected options return null after save or update. Can you please ...
0
votes
0answers
13 views

Icon 32 for Posts Product Index Page

Can you please let me know that if WordPress yet supporting Icon 32x32 in index page for Custom Post type? I am able to add icon 16x16 for CPT Menu but cant's find any option to add Icon into index ...
0
votes
1answer
28 views

Getting the IDs of a custom post type

I have made a custom post 'case studies' which has a number of posts. I wish to get the IDs of each of these posts to manipulate the data, but despite looking at similar threads, I cannot piece ...