Questions tagged [custom-post-types]

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

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

Create read-only custom post type for everyone without having to set up a new capabilities?

I've seen a bunch of posts about how to do this, but they all require adding a new capability (and usually also auto-assigning to admin). For my purposes I want the custom post type to be read-only ...
0
votes
1answer
10 views

Post Attribute Section missing for Custom post type

This is how I created the custom post type function wp_custom_post_type_listing() { $labels = array( 'name' => _x('Listing', 'post type general name', 'wpprolister'), ...
0
votes
0answers
13 views

get_the_terms child terms for current post/custom post only

Inside a Post / Custom Post type loop, I am trying to get child terms selected on the edit screen of that post/custom post. For Example: Zoologist ( Parent ) Pre Zoologist Post Zoologist Now if ...
0
votes
0answers
29 views

Problems in paginate_links with custom query loop and MB-Relationships

Im having some troubles with paginate_links. Im using the plugin MB-Relationships, and 2 custom-post-types: Artist and Artworks. On the single-artist I need to do a Query to show all the artworks ...
0
votes
1answer
17 views

Trigger WP CRON from a date in a Custom Field?

I have Custom Post Types which have a vanilla 'date-picker' for each post. My Custom Posts are actually events that are always in the future. I'd like to know if I can somehow trigger an alert when ...
0
votes
0answers
40 views

remove post-name from title in custom post type

I simply want two custom post type meta propertys to be the identifiers for the URL. I implements a solution but it just 404's registering post type: final private static function ...
1
vote
1answer
49 views

Custom template won't load for a custom post type (custom permalinks used)

I created a custom taxonomy for my custom post types. function create_states_hierarchical_taxonomy() { $labels = array( 'name' => _x( 'States', 'taxonomy general name' ), 'singular_name' ...
-3
votes
1answer
29 views

Creating a complex website using WordPress

I'm a web developer, a WordPress rookie, and I would like to ask how can I create a website using WordPress that can do the following? - the admin can add a country to the countries list, and each ...
0
votes
1answer
17 views

Custom post type archive with page as parent url

I have a custom post type called articoli-redazione. I would like to make archive url of this kind of post type to have a PAGE as parent as in this example: https://mywebsite.it/page-name/custom-...
0
votes
0answers
18 views

custom post type url rewrited redirecting to home page

So I'm in the position where I thought I had setup my custom post types custom url correctly (it should be in the format domain.com/malta-property/locationofproperty/referencenumber). I don't want the ...
0
votes
0answers
10 views

Front end form, save as custom post and email to users

I want to create a form in my theme that saves a custom post ('type' is 'letter') and then mails it to users from a query (for example users that have a custom key 'user_sub_newsletter' with value '...
2
votes
1answer
33 views

associate custom post type with tags with specific pages

I have various products (custom post type) which already have categories but I have now I have added this line to be able to add tags to the products. 'taxonomies' => array('post_tag') So, I ...
0
votes
1answer
14 views

display the posts of Custom Post type in custom category

I create custom post type named "project". and the custom taxonomy of project is named "project_cat". so my question is that if I create an "apple" taxonomy,and the URL will be http://localhost/...
0
votes
0answers
45 views

Is it possible to link an external stylesheet, exclusively within a specific single post template?

SOLUTION Big shoutout to the wonderful SallyM, who answered this very succinctly in the comments of this post. If it helps anybody, here's the code that I used. Note: Replace the //CONTENT// with ...
0
votes
0answers
16 views

Why do my custom post type show up in all pages?

I was doing a page with template-parts to call my custom post type but the posts are popping up across the top of the site, I think it's because of the query , when I deleted it they stop popping up ...
0
votes
1answer
33 views

Shortcode and get_template_part

I'm developing my own plugin for my wordpress. I create a shortcode for my plugin and CPT with a custom taxonomy and custom single-CPT. When I try to use the function get_template_part() in my ...
0
votes
0answers
19 views

Custom post types imported from another wordpress site, not showing on frontend unless I go in and reupdate them

I have duplicated a wordpress site, using the same theme and exported and imported same content. In the Wordpress admin everything seems there in the new site after the import, but when I go to pages ...
0
votes
1answer
21 views

CPT Taxonomy As Archive Page – Error 404

I have a CPT called Clubs. To 'categorise' posts depending on if clubs are in the same league or cup competition (or neither), I also have a custom taxonomy called Opposition. To show which clubs are ...
0
votes
0answers
17 views

CPT search NOT finding results from posts title

I have a search bar to search for CPT (properties) on a page and show results below it including on a map. The search works if searching by address but Its not working if I search by the post's name/...
0
votes
1answer
26 views

Show Post Thumbnail In Custom Post From Other CPT

I have a 'Match' CPT to create posts for each game played by a football team. These posts display details of the opposition team by pulling through information from the appropriate post from another ...
0
votes
0answers
20 views

how to add 2 custom field forms?

i am working on a small project for my school. the main goal of the project is tyo make two forms for adding reports to the website both of them must be shown as tables i've already made the forms ...
0
votes
0answers
11 views

Load respective custom field as input field when the select option is changed

I have 2 custom Posts Type Subject Clusters ( is a group of subjects) Subjects So when a new cluster is saved, it saves a group of subjects. Subjects (2nd custom post type) can be added via a ...
0
votes
0answers
16 views

show the author of a custom post on profile page

First, sorry for my english. My problem is complicated to explain. My client has a WordPress site that has been developed entirely via code and I took over the management of it. I want to be able to ...
1
vote
2answers
101 views
+50

Is there possible way to modify custom post type?

I use a third party plugin and plugin has created a custom post type called "creations". Bu there is no archive page, there is no single page, there is no admin menu page... But data are saving on ...
0
votes
0answers
17 views

wp-update-post does not work if the title of the post is more then one word

I have two functions that should be updating a custom post types within a loop. The problem If the existing post type post title is longer then one word the posts does not update if the function is ...
0
votes
0answers
8 views

Add user tag to corresponding custom posts

I use The events calendar plugin as a timetable for scheduling staff. Each event (custom post) represents a shift. Each event title (post title) is named after the particular employee of that shift (...
0
votes
1answer
14 views

How do I query with multiple custom fields orderby in same column?

I have a list of posts, one column of which I am trying to set in alphabetical order. The problem is that these posts have one of two different custom field value types shown in the same column. One ...
1
vote
2answers
39 views

Permalink Structure problem with cpt and custom taxonomy

I'm working on a WP website with many CPTs and Custom Taxonomies, but also using the regular "post" post type for the regular blog section of the site. I want the blog posts and archive and ...
0
votes
0answers
10 views

Attaching image to an existing post programatically, the attached file is blank

Attaching image to an existing post programatically, the file gets attached to the posts in the array but it does not end up as an image, its a blank file. Got the code from the wordpress codex: https:...
0
votes
1answer
19 views

How to create an IF statement in the Main Loop for Custom Post Types

Firstly, this is my first WP project and I'm learning as I go... I know this is probably an easy thing to achieve, but for some reason I'm having trouble getting it to work... so apologies if this is ...
-1
votes
0answers
15 views

$meta_key not work if it is a dynamic variable in update_post_meta

The Scenario I have a dynamic variables called $week_s* that in turn is made up from a variable called $week in a form as a select type. These variables needs to be use as the $meta_key value in a ...
0
votes
1answer
24 views

ACF get_field() is not returning a value in WordPress

I am using ACF and CPT cooperatively. I created a shortcode to be placed in a text module in my theme. It works well. Yet, when I call ACF get_field(), it's not returning any value. I tried looking ...
0
votes
0answers
28 views

filter by custom taxonomy using ajax

Hello i've followed this tutorial to filter posts by category using ajax and it was working fine, but i had to change to a custom post type 'actus' and custom taxonomy 'categorie'. and didn't work ...
0
votes
1answer
8 views

How to add post type in masonry posts elementory widget

When I try to create a website using Wordpress 5.2.2. I found a widget called Masonry Posts in Elementor Panel. But when I added the widget and checked there is no option to choose the post type. We ...
1
vote
1answer
21 views

Can't remove front from permalinks for custom taxonomy category page

I've made a custom post type called 'portfolio' and a custom taxonomy called 'portfolio-categorie'. While I see the new categories in my pages, I have a problem removing the 'front' from the url ...
-1
votes
1answer
53 views

Use a Variable in update_post_meta as the $meta_key

looking at the example on wordpress.org update_post_meta( $post_id, $meta_key, $meta_value, $prev_value ); I seem to be having a problem replacing $meta_key with a variable. here is my code ...
0
votes
0answers
23 views

add shortcode to custom post type list

im trying to generate a shortcode for every custom post type object i create and show that shortcode in the list of my posts. Elementor does this in its templates post type. How can i manually add ...
0
votes
0answers
29 views

Trouble adding custom featured image for custom taxonomy TERMS

Wordpress version 5.2.2 Local development - WAMP PHP version 7.0.1 I am building car dealership website. Goal: Set featured image for custom taxonomy - Body Types Set featured image for custom ...
0
votes
1answer
30 views

Convert post type to another

I am designing a website intended to list local events. Ideally registered users would be able to upload new events from the front end and the website would display all the upcoming events in ...
-1
votes
0answers
17 views

Adding language code into admin body tag

I´m trying to add a language code of the current product post into the Backend Body Tag in order to hide/show via css some custom fields depending on the language of the post. I have this code to ...
-1
votes
0answers
7 views

Change the font size in Zoom Box item

I'm having a problem with my page, specifically in the font size when it's zoomed in in zoom box items. I don't know whether workaround to resolve this exists but I've tried looking back and forth but ...
0
votes
0answers
11 views

Crate SQL view in WordPress database from custom post types and fields

I'm trying to create a mysql view inside WP database that selects and then show some custom post fields. E.g.: with custom post types Movies and Reviews create an SQL view with movies name, ID and it'...
0
votes
1answer
33 views

Remove POST_TYPE from custom post type permalink

I have a post type named services with the following permalink DOMAIN/services/investing/ (Single Page Permalink). I want the permalink to be changed like DOMAIN/investing/. I don't want the ...
0
votes
1answer
19 views

Pagination Error : Duplicate argument being outputted

I've been writing a custom search.php loop for some time now and I'm running into a weird problem. My php argument is outputting some unexpected results by repeating the template file. Currently I ...
0
votes
1answer
15 views

dynamic vue widget inside custom post

Im fairly new to WP development and am trying to create a plugin that generates a widget depending on the settings set in the custom post type. The widget is written in vue.js, and i would like to ...
0
votes
0answers
27 views

Order by terms for specific custom taxonomies

I am using the following code to try and order property listings by state for For Sale and Sold custom taxonomy terms $terms = get_terms( 'state' ); // $terms = get_terms( array('status', 'state' ...
0
votes
0answers
6 views

Changing the post count of a custom post type category

Total WordPress newbie over here. I wanted to know how to change my product category pages to show more than 10 products. I'd even be willing to pay someone a fee to do it for me because I so scared ...
0
votes
0answers
15 views

Store CPT 'Reviews' average ratings to a WordPress DB table or to a DB custom table?

I am working on this portal in which users can review the services (with description and rating) of a cultural place. BASICALLY, I created two Custom Post Types (CPT) with Pods, one is ...
0
votes
0answers
30 views

Guided post type create based on category tree

I’ve created a new Post Type ‘Ticket’ with a Category Taxonomy. Categories have Sub Category up to N level. What I’d like to do is let the front end user create a ticker where he would be guided by ...
0
votes
1answer
61 views

Display a post from custom post type only if all the selected taxonomies and custom field value matches the record

I have created a custom post type exam_result with academic_year as a custom taxonomy, school_class as a custom taxonomy and roll number as a custom filed using the Advance Custom Field plugin. The ...