Questions tagged [type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

REST API allow POST for particular Cutom Post Type

I created custom end points for my custom post types to get only data that I want like title, content and featured image and few custom fields. I am getting REST json data fine. I am building an app ...
0
votes
1answer
22 views

Wordpress Pods Custom Post Type - separate Media Upload folder for each custom Post Types

I searched but unable to find the answer. I am using Pods Framework for creating custom post types in Wordpress. I want each user roles to have different media upload folder so like I have a post ...
0
votes
1answer
31 views

YOAST SEO won't work on custom post type archive [closed]

I created my custom post type page (archive-objects.php). This page works fine, I have been created page for it and attributed template to it. So everything is okay. But something wrong is with YOAST ...
0
votes
0answers
14 views

WordPress Wallet/Credit without woocommerce

I am trying to create a credit/wallet like system where user can add their credits from the front-end and when they clicked (buy) a CPT, it would subtract from their total wallet balance. I've tried ...
0
votes
0answers
22 views

Add custom taxonomy slug to URL of Custom Post Type

I have a Custom Post Type named "blog", and a Custom Taxonomy named "area" (both setup using the CPT UI plugin). I have also used below code to add the taxonomy slug in the url, so that standard WP ...
0
votes
1answer
33 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
28 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
280 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
14 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
27 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
55 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
25 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
35 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
2k 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
1answer
66 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
466 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
169 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
240 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
vote
1answer
37 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
75 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
47 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” ...
1
vote
2answers
819 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
118 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 ...
3
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
408 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
41 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
34 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
96 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
32 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
248 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
940 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
328 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
527 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
7k 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
112 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
68 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
36 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
96 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
136 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 ...