Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [type]

The tag has no usage guidance.

0
votes
1answer
31 views

CPT archive redirects to single post

Ok, the title does not help too much, so let me try and explain. It's a Genesis-based website. I created a CPT: function cptui_register_my_cpts_livestreams() { /** * Post Type: live streams. */ ...
0
votes
0answers
20 views

When clicked Restore link and permanently link, the link you followed has expired is shown

I have created custom restore and permanently link in the custom column of the custom post type. I have created the restore and permanently delete using the following codes. // Actions to delete. ...
-1
votes
1answer
170 views

custom post type single page template not working

I created a page portfolio and select template Portfolio Template My portfolio page does not access the template-portfolio.php file. In which also includes content-portfolio.php in template parts ...
0
votes
0answers
12 views

How do i get post content after the click of the each sub tab of the parent tab?

I'm working on the custom template in this page I have added the JQery Tab in the, now how do I get content of each sub tab after click on it? I have created Custom Post Type in the admin panel ...
0
votes
0answers
25 views

Post relationships/nesting

Ok, I know that posts can't be nested but for the purpose of this question, I'm using the word. I'm having some trouble wrapping my head around creating a pedigree site, I'll explain where I am and ...
2
votes
1answer
50 views

Type hinting and void return question

Say I have a class that registers a custom post type like class Test { /** * The custom post type slug * * @var string * * @since 1.0.0 */ const POST_TYPE_SLUG = 'test'; /** ...
0
votes
0answers
22 views

Manual Scheduler For Custom Post Type

I have a custom post type with a completely different interface (basically, I've removed all wordpress metaboxes and added my own). I am trying to build a schedule metabox for this custom post type (...
0
votes
0answers
32 views

Custom Post Type Rewrite URL

So I followed a guide on another post here to add a taxonomy to the post type URL which works BUT it breaks the url's for the pages. My permalink structure is %postname% and my code is as follows: ...
0
votes
2answers
1k views

wp_query 's' parameter does not work with custom post type

I have a custom post type 'property'. I am trying to make a search for it, but it does not work with wp_query parameter 's'. $wp_query = Wp_Query(['post_type' => 'property', 's' => 'test']); ...
0
votes
0answers
29 views

Custom Post Type with Custom Taxonomy returns no record

I have a bit of a puzzler here. I went through the whole forum for answers and couldn't find what I was looking for. I have a custom post type of "blog" and taxonomy of "blog_post." For some reason,...
0
votes
1answer
45 views

Custom Post Types and Broken Permalinks

The permalinks on my website breaks frequently. I found out that it's being caused by a plugin I created. The plugin basically creates a custom post type with custom fields and stores in the wp-...
1
vote
1answer
412 views

Enable Comments Box On Custom Post Type

The wordpress theme I'm using doesn't support comments on one of its custom post types (Shows) and I've been trying to enable them. I added the code below to single-shows.php (copied from shows.php) ...
0
votes
1answer
114 views

How to allow .bin files upload?

How can I allow .bin files upload in media library? I have found couple codes online but none of them actually work.
0
votes
1answer
46 views

register_post_type permalink

Next, I have a problem. I created a post_type = 'gallery'. So when I open my gallery my link goes like this: localhost/gallery_name/image_name but I need a structure like this: localhost/post_name/...
0
votes
1answer
146 views

Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404

This problem has been for bugging me for days and I feel that I am close! Creating a review website, I have custom post type called review, organized in a custom hierarchical taxonomy niche. Put ...
-1
votes
0answers
144 views

Custom Page Pagination big issue

I create custom page type for portfolio and I want to use pagination for that page, everything is going well but I have one issue, - When I select portfolio page as Front Page on Settings -> Reading -...
1
vote
1answer
35 views

Need a help on sanitization

I have a theme on review, and I do add section 'type'=> 'select' on few occasions like this. $wp_customize->add_setting( 'personal_lite_post_link', array( 'default' => 'enable', ...
1
vote
0answers
69 views

Turn On Comments On Custom Post Types in Directory Theme

I have been trying like crazy to get comments turned on in a directory theme with Custom post types. Their support wont do much of anything but link me here and I've tried what I've found, but its ...
-1
votes
1answer
45 views

Display post structure in function

I have custom post type : edge, so I built some content by Visual composer. Now I need to display all post type edge in my page. I use the following code in function to get posts but I can not keep ...
1
vote
0answers
29 views

ERROR: Your feed is invalid (after update WP4.7) in custom types

i have created a new custom type “companias” with pods framework plugin , this custom type have this own website with its feed news, and other custom post types i have created. For example “fercam” ...
0
votes
2answers
631 views

pre_get_posts filter using numeric meta_query comparison (from dates)

I have an expiry date ACF field 'post_end_date' which has been applied to multiple post types, including 'post'. I'm trying to filter out any posts, across the entire site, where today's date is ...
0
votes
1answer
34 views

How to use Categories of custom post type

On my website psychscenehub.com I have Custom Post Type setup. Just Like the WordPress default Post section, I can see the categories on Custom Posts, but I don't know how to use them to display on my ...
-2
votes
1answer
105 views

Default post type doesn't display in url

My site currently has an opinions page which displays opinions posts (/opinions/). The post pages are only showing as /post-title/ when I need /opinions/post-title/. Code below, changes the default ...
0
votes
1answer
41 views

single- and archive- templates not being applied to custom post types, not even after flushing permalinks

As stated in the title, I'm unable to get the archive or single pages of my custom post type to use the correct templates for them. Funny thing is, they worked just fine on my virtual server (WAMP), ...
0
votes
1answer
61 views

Display one post randomly from category on home page

I have a custom post type called "Milo-Books" and a category named "Featured" with ID of "100". I want to run a query which pulls out on post from this category on the homepage, but randomly and I ...
2
votes
3answers
3k views

Using single.php from plugin folder instead of default template folder

I am trying to figure out how to use another single.php for a custom plugin I'm making. It's for a custom post type. Because if people install this plugin, they won't have the custom single-product....
0
votes
1answer
63 views

Showing the project type in HREF

Im kinda new to PHP so bear with me. Im building a site for my uncle using the Fluxus Theme in Wordpress. He's an artist, his art is displayed in the following order: Menu Category1 --Actual Art --...
0
votes
2answers
345 views

Custom Post Type doesn't use single.php or single-{custom_post_type}.php

I tried to set up a custom post type in Wordpress, and everything worked just fine. Until displaying a single post from my custom post type. First it didn't automatically use the single.php (as it ...
0
votes
2answers
39 views

How to retrieve custom field values and save again as array

I am new to PHP and WordPress. I have this scenario. There are 4 custom fields saved in page, named: _custField1 _custField2 _custField3 _custField4 What I need to do now is to fetch their values ...
0
votes
1answer
32 views

Meta boxes not saving

I have a custom post with two custom meta boxes that I add using this tutorial:http://wptheming.com/2010/08/custom-metabox-for-post-type/ When I update the post, it disappears. My code: function ...
3
votes
1answer
95 views

Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?

The parameter "_builtin" => true is a huge help for me, as this will set good permalink structure, like standard posts, for example: example.com/my_category/sub_category/POST-NAME instead of ...
1
vote
1answer
61 views

Permission issue with custom post type - not added to menu - by plugin

I've created a custom post type and taxonomy like this... function register_post_type_products() { $labels = array( 'name' => _x('Produkter', 'post type general name'), ...
0
votes
1answer
30 views

How to list all names and descriptions of a custom taxonomy

I have a custom taxonomy (toolkit-sections) inside a custom post type (toolkit-tools) and I'm looking to just list the taxonomy names and descriptions from toolkit-sections on a homepage. I don't ...
1
vote
1answer
2k views

Duplicate Custom Post Type and Taxonomy Slug

I've seen a few questions that are very similar, but I haven't been able to get an exact answer, so I'm going to explain my situation here. Quite simply, I need the following url structure: site.com/...
0
votes
1answer
222 views

How to display data in archive page?

I have a custom post type 'job'. I created a archive-job.php . How can I display 'post date', 'city', 'state' in my archive-job.php page? Currently, my archive-job.php page displays a list of jobs ...
0
votes
1answer
895 views

Custom post type single (permalink) throws a 404 error

I'm working on a website that has Woocommerce installed (also a CPT if I'm right, but that one works fine). This website has a custom post type for jobs, this cpt has posts that are linked to in the ...
1
vote
0answers
1k views

Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?

The wordpress theme I'm using uses a custom post type called 'coupon' and a custom taxonomy called 'store'. The default permalink structure for a coupon post is site.com/coupon/CouponPost I would ...
0
votes
0answers
80 views

WP Admin register taxonomy and post type performance

I noticed that the wp backend (admin) gets slower (and slower) when creating custom post types & taxonomies. (note that I'm not flushing any rewrite rules). Right now I'm calling the ...
3
votes
0answers
326 views

Add custom field to category of custom post type

I want to add a custom field (for a icon) to categories of a custom post type. I use the default category type and not a own create category taxonomy. How can I add the custom field only to the ...
0
votes
1answer
103 views

Custom permalink based on custom post type fields

I'm workin on new webiste and I got stuck :( Basically I've created a custom post type for products with custom fields etc. Each product has a main category and subcategory - selected from <...
0
votes
1answer
524 views

Custom taxonomy archive page problem

My website is built on custom post types, that I have organized with different custom taxonomies. The menu buttons are the taxonomies archive pages (red, blue, green), so that when you click on the ...
0
votes
1answer
6k views

How to detect if is_404() or is_page() or etc…? [closed]

is there any way, to output, like this: echo $current_type; and it gave me: is_404() or is_page() or whatever it is_blabla()
0
votes
1answer
111 views

Style Wordpress Custom Post Type Single Page

I'm registering a custom post type 'events'. The events can be listed using a shortcode, and when you click on an event you go to the single view of that event. Now, I want this single view page to be ...
0
votes
2answers
67 views

How to make a template for a specific post of a custom post type?

For the Page post type: I can create a logout page in the CMS and create a page-logout.php for its template. I created an Account post type but I can't use account-user-registration.php for a User ...
0
votes
1answer
35 views

Get new post meta data when (custom) post is saved

When I save my post (custom post type: project) I want to get the meta data for a specific key that I just inserted. Based on the value of that key I insert a product in WooCommerce. What happens is ...
0
votes
0answers
95 views

Checking if some condition is matched before inserting post into database

Is there a way to check if some requirements are matched before adding new instance of custom post type to database? Like custom policies for adding new posts etc? What I want to do is to build two ...
0
votes
1answer
134 views

Custom posts in different columns style

I'm trying to output a custom type posts with a sticky/featured work in a col-8 (thumbnail) and col-4 (content) then the rests of the posts should be in col-4. So far I have tried the code below but ...
0
votes
1answer
90 views

Optimize CPT-function with a loop

I want to optimize my functions of a Custom Post Type (CPT). Now I have 10 meta boxes. For each box I have an extra function. The aim is to produce the 10 boxes in one function. I already tried the ...
0
votes
1answer
195 views

How to include a post type in the admin/backend?

I'm changing the backend/admin and want to show a div above the pages. How can I include the pages like the example; <?php include('./tools.php') ; this works but when I choose edit.php / edit....
0
votes
1answer
1k views

Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]

When reading posts with WP_Query how would I get the data type of an advanced custom field (textbox, date, number, repeater, …) ? My code: $loop = new WP_Query( $args ); $posts = $loop->...