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

learn more… | top users | synonyms (1)

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
0answers
23 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
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
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
0answers
17 views

All of one Custom Post Type as a child of a Standard Page

I'm working on a site right now where there is a need to have a Custom Post Type act as the child of a specific Page (That is, all posts within the post type that do not have a parent, use the page as ...
-2
votes
0answers
11 views

Custom Multi-image Post

Can anyone recommend a way provide a simple multi image post form for my contributors or authors? I want to restrict the format in which they can post. The form should only allow image uploads (no ...
0
votes
0answers
14 views

Pagination not working for custom post loop [duplicate]

I have a loop for my custom post, and it displays the pagination links fine, however when i click to the next page it displays the same posts again (event though the URL shows its on page 2). Below ...
0
votes
0answers
16 views

Create a role specifically for creating and editing a custom post type

I am creating a theme for a business. Using the WCK plugin I have created the custom post type 'teammembers' in which each post is a member of the team (name, role, image). I would like to make it ...
1
vote
2answers
61 views

How to hide CPT files from media library programmatically

We have created a CPT which allows our customer to upload files from the admin page to a folder outside of the wp-content/uploads folder. Files are uploaded and manipulated using wp_handle_upload and ...
0
votes
0answers
26 views

custom post type URL change

At the moment, the urls for my movies post type look like .com/movies/ryi2NKR5ZY4DCNWG0XPj/ I got the 20 character hash in there by making the post name the hash like this: function ...
0
votes
0answers
11 views

Rewrite url for two custom taxonomy of one custom post type

I have a custom post type 'courses'. To this custom post, I have two custom taxonomies. - course category(slug is course_category) - other category(slug is other_category). I want to display the ...
0
votes
1answer
16 views

Main site single-property.php design, as homepage of a multisite

I've been researching how to do this for some time now, and I'm coming up short. I have my main blog, example.com, which we've created a custom post type of Property. I'm needing the exact layout and ...
0
votes
0answers
12 views

How to require match for all arguments passed in URL?

I'm developing a site for a small car dealership with a proposed URL schema of domain.com/vehicles/<manufacturer>/<vin>. The Problem I can't get Wordpress to correctly handle when URL ...
0
votes
1answer
33 views

Copy custom field value to post title

I used the code found here. However, that does not update the title field until you open the post and hit Update button both via the back and front-end. I tried changing "save-post" hook with "...
-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 ...
0
votes
0answers
11 views

Custom post Type search gives wrong results

i created custom post type for properties . there are 7 entries for Wendy's properties . when i search Wendy, it displayed all results related to Wendy's.when i type Wendy's , it display 3 results ...
0
votes
1answer
13 views

CPT defaults to single.php?

This is more of a clarification question, but if I don't have a single-CPT.php script in my child theme, then will all my CPTs default onto single.php? I am just wanting to clarify more than anything. ...
0
votes
1answer
29 views

Custom post type and taxonomies structure

I am looking for having custom post types and "categories" (limited, known, and just only one) for post. I want the following URLs: site.com/cpt (archive of all the posts inside custom post type) ...
1
vote
1answer
32 views

How to create Blog Post Specific Widget

I want to create widgets which will display based on post. I have considered the option of creating a widget post type using Advanced custom post type plugin and populate this widget while writing ...
0
votes
1answer
29 views

DIsplaying URL of custom field in last post of certain taxonomy && post type

So, I need to echo the URL of a custom field from the last post published in a certain post type and with a particular taxonomy. This code so far works OK, but even that numberposts = 1, $...
1
vote
1answer
22 views

Unable to get post archive link

I'm extending the Fall Wordpress theme by using my own child theme. One of the things I'm trying to do is to make an archive page for the 'service' custom post type. That type is defined in the parent ...
0
votes
0answers
24 views

Save custom field as 0000-00-00 00:00:00 (date) to meta_value in Wordpress

When I create a custom post type with custom field, how do I write to meta_value in database in int (0000-00-00 00:00:00) format instead of unixtimestamp?
0
votes
1answer
31 views

Warning: Invalid argument supplied for foreach() in post.php [closed]

Just moved my site to another server and now I get this error: Warning: Invalid argument supplied for foreach() in /home/menta/domains/land.menta4u.co.il/wp-includes/post.php on line 1172 On ...
0
votes
1answer
17 views

Get the link of the first post of a custom taxonomy in a custom taxonomy list

Currently, I'm doing this using a custom field, but I would love for this to be automatic. Basically, I have a page that will list all the entries of a custom taxonomy, but I want the links of the ...
-1
votes
1answer
32 views

How to string lines from the_content() hook in WordPress?

Inside my content-video.php template, I have the following codes: <iframe src="<?php echo get_the_content(); ?>" width="960" height="540" frameborder="0" allowfullscreen="allowfullscreen">...
-4
votes
1answer
20 views

ACF select box css color change

i have a trouble with Advanced custom post i try to add select box "K dispozicii is "free" and "Obsazeno" is "occupied" and i need to change colors green for free, red for occupied here is the code ...
0
votes
0answers
21 views

Custom single post pages not using single-template even after flushing permalinks

I have moved my site from a local server to production however my theCommunity custom post types are not using single-theCommunity.php template. I have also tried flushing permalinks as recommended in ...
0
votes
1answer
21 views

Displaying Wordpress Parent field in child post

I want to display the title from a parent field within a single child post (these are custom posts created with wp-types). At the moment, all I seem to get is the title of the current post, and not ...
0
votes
1answer
16 views

ACF in wordpress

Hi i have a slight problem when making a custom post type widget. The problem is that when i want to get the field i want to use in a inline style it doesn't work. This is my code: class ...
0
votes
1answer
16 views

Custom post type in Custom widget - $listItem

Hi i have a slight problem when making a custom post type widget. the problem is that when i add a custom field in the code the part that shows the custom field information get's on top of the output ...
0
votes
0answers
25 views

Custom post type taxonomoy template is not showing more than two post

I am trying to make a page on a custom post type(new_arrivals) taxonomies (sieraden, trouwringen, horloges) template. I have made the template taxonomy-new_arrivalstype.php like this. Inside I add the ...
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 ...
0
votes
1answer
26 views

Query events post type after current date and timezone

So I am making changes to a clients website and currently they have an events post type with some custom fields that allow them to set an events end date/time and the events timezone. The custom ...
0
votes
0answers
18 views

Changed Post Type Name and Taxonomy Name. How to change it in Widget as well?

Hope someone can explain me how to update the widget to the new post type name and taxonomy name. My Old custom Post Type Was "aps-products" and new is "phones" and my old Taxonomy Name was "aps-...
0
votes
0answers
18 views

HTML email template using custom post type on genesis framework

I'm trying to generate HTML emails using a custom post type. What I would like to do is slot content from post type post into this template to build an editoral newsletter. The problem I'm having is I ...
0
votes
1answer
16 views

Add post type pages with plugin

Can I add the archive and single page for a custom post type added by my plugin? I know it will only have to be a best guess with contents like: <?php get_header(); ?> <h2><?php _e('...
0
votes
0answers
15 views

Getting URL from changing custom post type

I have a manually-built secondary navigation with a button that links to a Current Exhibiton custom post. For obvious reasons, the current exhibition post changes over time. How can I manage to ...
0
votes
1answer
23 views

Change the url of a custom post type to include taxonomy

I'm trying to create a custom post type where there will be a lot of identical post names, but they will have different taxonomy values. Is it possible to define a slug mode where the taxonomy ...
0
votes
1answer
30 views

WP_Query Custom Post Type if Category ID Equals

I've setup a custom post type "slides" and I've created two categories for the slides custom post type: "slides-testimonial" (id = 7) and "slides-regular" (id=8). I would like to run a single loop, ...
0
votes
1answer
14 views

Adding/Changing Functionality of Custom Post Type Main Admin Page

I've created a custom post_type plugin. I would like to add a custom filter to the main list page that is displayed when you first click on the menu item in the left-hand menu (see image). But, I ...
0
votes
1answer
26 views

Programatically inserted posts not showing in Posts Table

I'm trying to insert a custom post through a form. It's a brief post, most content are custom meta fields updated with add_post_meta. So far, post inserting is working fine, except for a detail. This ...
0
votes
0answers
36 views

Custom Meta Box Image Gallery Not Saving

I'm having an issue of a custom meta box I'm building based off of WooCommerce's Product Gallery meta box. The meta box is not saving for some reason. I've tried some options from many different ...
0
votes
0answers
32 views

Form to custom post type and custom taxonomy 2

Following on successful addition of custom taxonomy with a great help here I've been banging my head on the following three things. How would I add another taxonomy "trademen-category"? How would I ...
0
votes
0answers
16 views

Issue with temporary link on the frontend

I have a site working with a custom post type (Exhibition), and custom taxonomies (Exhibitions -> Current, Future & Past). When I display the archives for the Future and Past taxonomy values, it ...
0
votes
1answer
35 views

Form to custom post type and custom taxonomy

I am actually learning still. so if my question sounds a bit silly. kindly pardon me. But I seriously need help here. Using the links below, I managed to get the form working to the extent that it ...
1
vote
1answer
51 views

Custom template for post type not working

I have a post type shopping and in my single.php I am trying to get a certain template for this post type. So I did: \\ in the single.php get_template_part( 'template-parts/content', get_post_format(...
0
votes
1answer
22 views

Custom Post-Type not in admin menu

As I'm working on a private and custom theme for my website, I created custom post-types for different kinds of data i want to display (and adding extra data with custom fields). Anyways, as I ...
0
votes
1answer
46 views

Running get_posts within get_posts to get children of children

I have a hierarchal custom post type called “courses”. When you arrive on a course post there’s a check to see if the post has children. If the courses post has children it runs get_posts to display ...
0
votes
1answer
7 views

Show index and not the archive for “Dog Custom Post” with default slug

When creating a Custom Post, in my case with the name dogs and slug dogs, at the url www.example.com/dogs Wordpress shows by default the archive page if has_archive is set to true I don't want to ...
0
votes
0answers
17 views

Can't show post based on different level taxonomy

Custom post type : book Custom taxonomy : genre I have created some genre and I want to show immediate children genre of a specific genre. I have used following query $p_query = new WP_Query( ...