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

learn more… | top users | synonyms (1)

0
votes
0answers
23 views

Loop through custom post type taxonomies

I have created custom post type products and I want to show categories on products archive. I have this code <div class="container"> <div class="boxes"> <?php $cat_args = array( ...
0
votes
1answer
37 views

Custom post type custom taxonomy archive page name

How archive php file should be named? Url: mypage.com/gallerycategory/sport/ gallerycategory - slug of custom taxonomy of custom post type (name of custom taxonomy is gallery_categories with slug ...
1
vote
0answers
53 views

Wordpress custom post query with pagination

I know this is a common issue and there are many solutions out there. Fow showing custom post with WP query , I use a a snippet like this <?php $temp = $wp_query; $wp_query = null; ...
0
votes
0answers
24 views

Filter WordPress custom post type with taxonomy

I'm new to word press I have create one custom post called product and have three taxonomy in it. 1.product type 2.location 3.category now i want to search product with all taxonomy selected by ...
0
votes
1answer
24 views

Change Slug in URL of Posts of custom post type

I have custom post type registered with 'has_archive' => 'gallery'. It works fine when visiting mysite.com/gallery/ it opens archive-vmgallery.php and it works fine. However, I would like that vm ...
0
votes
1answer
22 views

Redirect User From Registration Page To CPT (profile page) with custom url

I am looking for a little advice regarding wp_redirect after successful registration, the plan is a new user registers and is then re-directed on success to a custom post type page 'Agent' wp ...
0
votes
1answer
29 views

custom_post_type with has_archive doesn't change permalink

I am not able to rewrite custom post type permalink. $labels = array( 'name' => __('VmGallery', THEME_TEXT_DOMAIN, THEME_TEXT_DOMAIN), 'singular_name' => ...
0
votes
1answer
56 views

custom post type archive page url to point to Page permalink

I wish that my 'custom post type archive page' would point to Page. The situations is as follows: I have Page in Wordpress with permalink http://myurl.com/galleries. This page shows list of posts ...
0
votes
1answer
34 views

Custom post type based on existing one

Im using a theme that comes with a portfolio post type and portfolio categories taxonomy. My problem is that I want my site to have 3 portfolio sections, each with its own category list. Can I ...
0
votes
0answers
17 views

How to avoid duplicate post entry admin page

I am building a cinema website with different custom post types. How do I avoid duplicate post entries? For example, I have a post type: Trailer First I add a trailer Terminator. After if I add ...
0
votes
1answer
19 views

Is it safe to change a Custom Post Type from “hierarchical:false” to “hierarchical:true”?

We have a Custom Post Type with contents on it, that always had its hierarchical setting set to false, and we'd like to change it so some new contents are organized as child of the old contents. I ...
0
votes
1answer
51 views

How to set up Custom Post Type archive page as Front page

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I ...
-1
votes
1answer
27 views

ACF Field to set Publish Date - Post Duplication upon Update

So I am attempting to have a ACF set the date published of a Custom Post Type... and it sort of works. It will set the date of the post correctly the first time, but upon updates it will update the ...
0
votes
1answer
33 views

Post search not looking at post title since 4.4.2 upgrade

looks like searching for posts on my custom post type isn't checking in the title of the job anymore. Worked fine before the update but now only searches the post content. Any ideas? This is the ...
0
votes
2answers
83 views

How to get category image custom post type taxonomy in wordpress?

I have a custom post estate_property and its has taxonomies property_category ,propert_action.I have installed WPCustom Category Image to upload image for each category of taxonomies. How to display ...
0
votes
1answer
15 views

Best way to change the blog page post type?

what is the best way to change the wordpress blog page post type. by default it fetches the posts with post type is equal to posts but how we can change to to lets say posts type is equal to blog. ...
0
votes
1answer
36 views

Single page for Custom Post Type not found

I made a custom post type named rt_test in a WordPress plugin as follow: register_post_type( 'rt_test', array( 'labels' => array( 'name' => __( 'Tests' ), ...
0
votes
0answers
14 views

Smart Search exclusive to Custom Posty Type

I am in the brainstorming stages of a project and wondering what is the best way to achieve the following. I will have a Custom Post Type of "Projects" which will contain multiple categories and some ...
0
votes
2answers
30 views

rewriterule not working

I have post type example with 2 records: exam1 and exam2. This post type was created by plugin Types Toolset (www.wp-types.com). So link to exam1 looks like my_site/example/exam1. Also I have 1 ...
1
vote
1answer
35 views

Custom Post Type within the Loop on Homepage (Page Template)

I'm trying to achieve something with the Loop and CPT. I've built a template page which will be the homepage of my website displaying articles and videos (the CPT). How can I add the CPT within a loop ...
0
votes
0answers
23 views

How to remove CPT comment feed from head?

In a custom post type I have set has_archive to false. In the head of a CPT page however I still find a link to a feed like this: <link … title="Page Title | Comments Feed" ...
0
votes
0answers
17 views

Post Types List in plugin options page

I'm building a gellery plugin. I've created a options page for it. I want to list post types in a select box. Codes; $args = array( 'public' => true, '_builtin' => false ); $output = ...
0
votes
0answers
32 views

After I changed the slug of a custom post type, the single page returns 404

I created a custom post type using types plugin the post type has ad as slug, but now need to change it to card, and I edited the slug field in the types panel. the thing is that new urls return ...
0
votes
1answer
77 views

Can custom fields be added without a meta box?

I'm building a custom post type entry screen (in code). I would like to have my fields display without a meta box surrounding them, so that they look more like the user profile page. Is that ...
0
votes
0answers
28 views

Displaying Custom Taxonomies that match other posts taxonomy

Here is my setup....I have a custom post type that has 2 custom taxonomies (About Me & Likes). In my page templates I want to show related posts that have tags in the "About Me" section that match ...
3
votes
3answers
122 views

Get random custom-post-type post to display within content

I have a function, within functions.php (all code below), that adds an advertisement after x amount of paragraphs to any given single.php post. I have a custom-post-type called advertising that has a ...
0
votes
2answers
70 views

Removed custom post type archive page shows blog page

On a website made with a purchased template, a custom post-type had an archive page. I didn't want that archive page, so I altered the custom post-type in a child-theme like so: function ...
0
votes
0answers
9 views

Custom Event's Plugin pages

I'm trying my hand at creating an events plugin from scratch for a client with fairly specific needs. I've gotten so far as setting up the CPT, creating and saving the metaboxes that I need with some ...
0
votes
1answer
39 views

How to change “post_class()” for a custom post type?

I am trying to keep the classes the exact same on my normal (blog) posts, and a custom post type I have called "locations". When I post a "normal post" I get the following classes: class="post-# ...
0
votes
0answers
37 views

Embed handler in custom field

I am trying to implement wordpress function wp_embed_register_handler() into a custom field. Using this instead of wp_oembed_add_provider(), for the urls I use do not offer oembed support. With help, ...
0
votes
0answers
27 views

Single-{custom}.php doesn't exist not matter what I do

This question has been asked and re-asked, I know because I've found every one of them here already. I don't know why I can't find the hint that I've messed differently than others so after hours of ...
0
votes
0answers
26 views

Custom post type single page - always show latest post

I have created custom post type 'products' and template: 'single-products.php' In this template file I have a code: <?php the_post();?> <h1><?php the_title();?></h1> <div ...
0
votes
1answer
34 views

meta query not retrieving posts

I am attempting to use get_posts() to retrieve posts that have certain topics attached to them, in my custom post type named 'leaders' Here is my query. $args = array( 'post-type' => ...
0
votes
0answers
30 views

Create slug for Custom Post Type Under two Parent Page with WPML

I would like this structure, WPML plugin with subdirectories, event default one. Desire structure: /en/2016-xxxx-xxx/ -> Page with Custom Template /en/2016-xxxx-xxx/term1/ -> Page with Custom ...
1
vote
2answers
38 views

Breaking up CPT output into two columns

I have the following code. I have a left div and a right div. How would I edit the below code to pull the first X CPT data and put it in the right column, and the next XX number CPT data to put in the ...
0
votes
1answer
24 views

custom post type does not working when adding in child theme function

I'm trying to register post type through child theme function.php but it does not working. However its working fine when i adding in the parent functions.php. add_action( 'init', 'testimonial' ); if ...
0
votes
1answer
19 views

retrieve custom post image through widget

My custom post has featured image. I need to retrieve it through widget. I am using get_the_post_thumbnail. But it is not working. Except this the rest of the widget is working fine. Here is the ...
0
votes
1answer
29 views

DOING_AUTOSAVE function in wordpress

Can anybody please explain in simple words (layman's terms), what this function actually does. if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; I am learning to code custom ...
0
votes
1answer
45 views

Pods pagination erases my sub menu

I've build a taxonomy that holds the categories of a custom post type. This is going to be used to create a sub-menu called categories that is a filter to generate all the custom post types that have ...
0
votes
0answers
25 views

How to get the custom post type in 'after_setup_theme' hook

I am trying to detect custom post types in 'after_setup_theme' hook. Right now I am using $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] for getting the URL of the current page. Then I want to ...
0
votes
3answers
33 views

Custom fields vs. Custom post types for a Portfolio Website

The Problem : I need to make a website of my Portfolio using Advanced Custom Fields and Custom Post Types UI plugins. Approach 1: Make a seperate post type for each Portfolio type (photgraphy ...
0
votes
0answers
16 views

Widget form is not saving value that retrieved based on taxonomy terms

Custom Post Type: employee Taxonomy: department Here is the code:for widget form function form( $instance ) { // Output admin widget options form if ( post_type_exists( 'employee' ) ...
0
votes
0answers
31 views

Can I override the permalink/slug on creation

I have a plugin that imports data from an external API, creates a 'Product' Custom Post type ( or updates an existing one ) and then adds all the meta data. Every time we update the product from the ...
1
vote
0answers
26 views

How to append element after thumbnail

Hey I just wanted to know how to add an element after the first thumbnail image in my loop. Basically I want an HTML div tag inserted after the first image in my post. Anyone know how to do that in ...
1
vote
1answer
70 views

Why is my category template ignoring post type?

I am currently working on two sites that make extensive use of custom post types. For both we have a defined number of items (cpts) that fall under a particular bucket (categories). One of the sites ...
0
votes
2answers
19 views

Help Saving Custom Post Type Meta Box

I have the following code used to create a Custom Post Type. All works the save function is being triggered, and it seems to be saving. But I cannot get the saved data to output in the text field on ...
0
votes
2answers
38 views

single-{post-type}.php

I have implemented a custom post-type "project". To see the page of the archives of these custom post types, I created an archive-projet.php To see this page, I type ...
1
vote
2answers
35 views

How can i skip same post from taxonomy term?

I'm trying to retrieve the posts of specific taxonomy categories. I have two taxonomy categories. Category One Category Two In these two have some different and same posts. So when i retrieve the ...
0
votes
0answers
26 views

Complex sorting of custom-post-types

Custom post: people, custom taxonomy: department, each department has (optionally) a custom field (boolean): team leader Desired output; Heading: Department A Team Leader Department A People in ...
1
vote
1answer
71 views

Why get_posts() not returning only selected category posts from Custom Post Type?

I use widget plugin Getting the random post & URL via ajax. Thanks fischi for help to rewrite functions. Problem is that function returns all posts from CPT, so category select doesn't work. ...