Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

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

images click popup form and submit images captions in email to admin?

Create Custom Post gallery..archive page display images. customer can click Enquiry Now button.. this button popup form submit all detalies name,email,phone no,msg to send email to admin
0
votes
0answers
7 views

How to avoid showing parent category if is not checked in wordpress

I'm not sure if what I'm asking is possible or not. Anyways, I'm fetching custom post type from the database based on category. When I tick subcategory or even subcategory of subcategory, all parent ...
0
votes
0answers
18 views

how to convert frontpage.php to dynamic page?

front page on WordPress theme is static and I can only edit it from the panel in PHP I need to convert it to a dynamic page and edit it with builder or editor on the dashboard
0
votes
1answer
21 views

Remove Header and style.css from Specific Post template

I want to add some custom code so I've created a custom post file with the following content. <?php /* * Template Name: Custom App * Template Post Type: post, page, product */ ?> <?php ...
0
votes
0answers
10 views

How to add filter to post_name just for a CPT

I was seeing this post on how to add a filter that allows adding dots to post_name. I made a change to use only dots. I want to make it work only for one type of CPT. But I don't know how to check ...
0
votes
0answers
9 views

meta query condition don't work

I have created a custom post type (Event). I want to show only two posts on the front page and the post should be greater than or equal to today's date. So I write this meta_query. $today = date('ymd'...
0
votes
0answers
7 views

Using custom post type to feed a dropdown (Woo order-id into wpforms)

Using the plugin wpForms, I can auto-populate a dropdown with Custom Post Types (they call it "Dynamic Post Type Source"). Say I wanted to use this functionality to auto-populate a dropdown with order-...
0
votes
1answer
9 views

Prevent A Specific Custom Post Type Showing In WP Search Results Page

I've excluded certain pages from the WP Search with the code below in my functions.php file. I also need to exclude a custom post type called 'sites'. I can't seem to find the custom post type ...
0
votes
1answer
23 views

Custom Post Type / Taxonomy not displaying archive

I am trying to use the Atreas Theme: https://wordpress.org/themes/antreas/ This is the site I am working on: https://sandbox.paediatricphysiotherapyassociates.com/ All I want is an archive page for ...
0
votes
0answers
9 views

Rows with custom columns not well formatted after Quick Edit save

I have a custom post type "promotion" made via code put on theme file functions.php. I also added some columns to custom post type list. They seems work fine, but if I Use the quick edit to update the ...
0
votes
2answers
32 views

How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?

(Edit: going for the "Student" badge, and wondering if anyone out there could up vote this question?) I answered a question about capabilities, but now I'm in need of help on the subject. And after ...
0
votes
0answers
8 views

How do I show custom posts in UM profile? [closed]

I am using the All in One Video Gallery plugin and Ultimate Member and I want to have a videos tab that shows only the videos posted by that person on their profile page. Right now, the shortcode [...
0
votes
0answers
14 views

Correct way adding External classes to Custom Post type and output their methods to template

So I'm creating Custom Post Type, and I have 3 external classes with namespace Test\Events\Model; Those 3 classes are final class Location, final class Event, and final class Person. Example of method:...
1
vote
1answer
18 views

Access $post object when adding custom columns to list table

We've got a custom post type called 'products' which stores all of its additional meta data in a separate table for performance reasons (we're expecting 1000s of records). We have extended the query ...
0
votes
1answer
8 views

ArgumentCountError caused by wp-includes/class-wp-hook.php

when we give $depth in argument of nav_menu_css_class it gives me argument error. Here is my code: add_filter( 'nav_menu_css_class' , 'eodwp_menu_item_class',10 ,3 ); function ...
0
votes
1answer
19 views

Remove plugin settings from post creation page for a user role

I want to remove plugin settings from the bottom of the post creating page for a given user type. I want to remove the "Plugin Organization" drop-down from the post creating page for a specific user ...
1
vote
1answer
14 views

'No Results Found' on single post for custom post type

I'm using the CPT UI plugin to create a custom post type with a custom taxonomy. I'm finding however that the individual post page shows "No Results Found". I'm using this page slug as the CPT custom ...
0
votes
1answer
15 views

Creating a custom post type upon registration for a specific user role

Can anyone help me to create a custom post type content when a new user is registered? But the user should be of specific role only. I have been searching but couldn't find any solution.
0
votes
1answer
20 views

ajax response not recieving

Will anyone help me in this regard. My problem is that when I ajax request WordPress, when I log that response in console it shows error/complete not response. jQuery(document).ready(function($) { $("...
0
votes
0answers
15 views

Show post only for user that matches category

Disclaimer: I am not a developer. I know really a little code. Hey! Thank you for your time! Well, the situation is like this: I have posts that are set to "CategoryA" for example. In Elementor I ...
0
votes
0answers
7 views

Question: How can I retrieve the post details liked by the current_user using the post_id from the “Different” post_type?

I am soo new to Wordpress development, so I am so lost in this. I have a custom post type "Like" that automatically adds the post_id of the page/post the user liked, and the "Like" post type contains ...
0
votes
1answer
22 views

How do I code access to the built-in UI of a CPT when it's placed as submenu of another CPT that is protected by role?

I am toying around with WordPress capabilities, and having some difficulty understanding where I am going wrong. Right now, I have an admin menu that appears for all administrators with STUDENTS as a ...
0
votes
0answers
16 views

Warning using plugin weglot [closed]

Is there a solution to the next problem? I installed the weglot plugin. I have several other plugins installed already in my page. The following message appears on the mobile devices (iphone, ipad) ...
0
votes
0answers
16 views

$wpdb->insert not working inside save_post tag

Will someone help me in this. add_action( 'save_post', 'product_price_box_save' ); function product_price_box_save( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ...
0
votes
0answers
16 views

CPT next post issue

I'm struggling on this one. I've inherited a project where I need a next post item on a custom post type. However, initially the CPT didn't have an archive. The following code I put in, is inside the ...
0
votes
1answer
8 views

Reordering admin columns for CPT with custom taxonomy and an added custom field

This may be a repeat but it's the combination of things I can't find. Custom post type is event. I have added an admin column 'Event Date' generated by ACF and it appears at the right. Everything ...
1
vote
0answers
6 views

Wordpress comments_open for specific user role or post type

comments_open is used for both post types, posts and products, the snippet below worked and allowed only (example) role users to comment enter code here add_action( 'init', function(){ $u = ...
-1
votes
0answers
8 views

Genius Lyrics - Annotations

how can I go about creating a system similar to genius.com on wordpress for song lyrics. Where you can annonate single lines from a multiline input? Thanks
1
vote
0answers
11 views

Keep a post copy when this one is updated - issue

I try to keep a copy of the previous version a custom post when this one is updated. It works, but duplicate the previous version twice. Help appreciated ! DUPLICATE FUNCTION : function duplicate($...
1
vote
1answer
9 views

Cron job for creating posts not excecuting properly

I've written a PHP script to create custom posts programmatically from Google Calendar events, and an action hook that purges all existing events and repopulates it with current ones. This works fine ...
0
votes
1answer
23 views

Restrict Access to Posts based on Custom User and Post Meta Data

I have a custom Post Type called Club Pages, and a custom role called "Club Leader". Club Leaders currently can only read, modify, and delete all Club Pages posts. However, there are many different ...
0
votes
1answer
16 views

Getting post attchment URL to populate a CPT Admin Page Column

Just trying to work out how to get the url of a file attached to a Post and displaying that in the admin page for that CPT. The file is attached to the post via an ACF file upload field called '...
0
votes
1answer
16 views

How to show first name and last name in custom post type columns

With the below code I am showing the user who created the custom post type's entry but only their username. This isn't helpful enough as I want to show their full name ie: first name and last name but ...
0
votes
0answers
17 views

Custom Metabox Info Not Saving

I have a custom metabox on a custom post type, and the input data disappears after I save/update the post. I've read through a bunch of similar questions but can't find an answer that fixes it for me. ...
1
vote
0answers
12 views

Unable to get Custom Plugin Options data

I have created a custom courier tracking plugin and I need to save courier API in plugin option page. Here is my code // create custom plugin settings menu add_action('admin_menu', '...
1
vote
1answer
14 views

How to use terms from the same custom taxonomy in different roles in a custom post type?

How can I use terms from the same custom taxonomy in different roles in a custom post type? I am developing a genealogy site which includes among other things biographies of ancestors, presentations ...
0
votes
0answers
9 views

Woocommerce style permalink structure

I was wondering how I use a custom post type written in code and make the URLs work similar to Woocommerce products. For example, I want my custom post type to work like so: /produce/ -- archive of ...
1
vote
1answer
8 views

How do I order multiple custom post types in the same menu position ( menu_position = 20 - below Pages)?

These are the args I used to get "Artists" display above "Master Artist Lookup" using the "menu_position" parameter. However , still does not display in menu correctly $args = [ '...
0
votes
0answers
9 views

Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu

I am currently translating all of my plugins with loco translate. This is working fine on frontend and in all metaboxes in the backend, but not in the wp-admin menu: The red circled word should be in ...
0
votes
0answers
6 views

How to make mydomain.com/[post_typeA]/[post_nameB]/[post_nameA] not 404: custom post types rewrite rules. ([PostTypeA]/[ParentPage]/[ChildPage])

I scoured this forum and a lot of others but I have not found the answer and starting to doubt whether it's even possible.. I'm trying to make a site with week and day posts, a day post is called "...
0
votes
1answer
19 views

The Difference Between Categories and Tags and Taxonomies and Terms

I've got a custom post type 'articles' and I've added a custom taxonomy 'articles_categories' which has its own terms. I was under the impression you can't have categories and tags on custom post ...
0
votes
1answer
42 views

Get custome post type name

I have a custom post type named 'industry', I tried to use get_post_type_object('industry')->labels->name to get the name but end up return empty value, what is wrong? This is the registered ...
0
votes
0answers
14 views

Display Custom Post Type Based on Taxonomy With WP_Query()

I would like to pull in 3 posts from a custom post type called 'articles' that have a 'Featured' custom taxonomy term. I'm using the code below, but it isn't pulling in just the posts with the '...
0
votes
0answers
13 views

Issue with WordPress AJAX Filtering breaking links on frontend

I've been using AJAX taxonomy/post filtering for the past week and just noticed something really strange upon further testing. When you select the filter criteria and click FILTER, it populates the ...
0
votes
1answer
34 views

custom post type - project link output via single-portfolio.php

I have the following code registering metabox with form input used to input live project link function portfolio_meta_box() { add_meta_box ('project-meta', 'Add Project Link', '...
0
votes
1answer
18 views

How do I find out which (page) template file my custom child post is looking for?

I am trying to make something like a web-app with WP. One of the issues I'm facing now is that I cannot find out which page template file my post is looking for. I have looked at template file ...
0
votes
0answers
24 views

Cannot display the_content() after removed WordPress 5's auto embed feature (iframe & blockquote)

Novice here, please help. I made a dynamic page with Custom Post Type UI plugin where the user can input news updates. The information to be filled are date, title, and a link (a clickable button that ...
0
votes
2answers
78 views

Add custom template 'sub-page' to Custom Post type?

I have a custom post type called 'Inspections' Doing this, you can access an inspection record by going to example.com/inspections/inspection-slug-here However, I want to add some 'sub-pages' if you ...
0
votes
2answers
63 views

Custom sorting in post columns by ACF Pro Select Field

I'm adding a custom column to the admin display for a custom post type. The custom column should display the selected options from an ACF Pro select field. Instead, it always triggers as containing ...
0
votes
0answers
13 views

REST API Custom Namespace - unable to add/edit post

I have setup a controller class for my custom post type which extends the WP_REST_Posts_Controller class as I need some additional validation around whether or not the post can be viewed. A custom ...

1
2 3 4 5
188