Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

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

Creating a Single Instance Custom Post Type with Limited Module Options using ACF and WPGraphQL

Hello WordPress community, I'm working on a project where I need to create a custom post type using Advanced Custom Fields (ACF) and query it via WPGraphQL to integrate with a Headless Next.js build. ...
Jason6's user avatar
  • 1
0 votes
0 answers
8 views

WordPress Shipment

I am trying to set up an e commerce website. Now I'm trying to set up the shipment settings. My problem is that I want to sell some products that are really heavy. Therefore I want to set up a special ...
UnkownPresence's user avatar
0 votes
0 answers
17 views

How to add CPT in Elementor pro search template

i have created a Search template in elementor pro, i'm using Archive Posts widget to show the result. but the problem is i want to include the CPT in the result. i tried the pre get post function, ...
vikram's user avatar
  • 1
0 votes
0 answers
17 views

One custom taxonomy with unique sets of labels for two post types?

I’m trying to use one custom taxonomy with different labels for different post types. I have the default “post” post type, and a “podcast” post type. Both post types have an associated Taxonomy with ...
fischermade's user avatar
0 votes
0 answers
8 views

How to add a post page from a button without reloading

I am a novice in developpement and I am trying to create a page. When I click on the button Gutemberg, it will generate a post page with a text and an image. The problem is that the page is created ...
OceaneEMILE's user avatar
0 votes
0 answers
16 views

I want to use an api data as the listing on my listeo theme [closed]

I am trying to connect an api with my listeo theme so that the listings on the listeo theme would be based on the api without affecting the themes structure.
Samuel Ayelabola's user avatar
0 votes
0 answers
16 views

Instead of returning post content, return code that I specify

I created custom post types called funds. My page has over 200 of them. After buiding the page the back end payment processor changed the way they want to display the form for donating. It is now a ...
Christa's user avatar
0 votes
0 answers
7 views

Fix Custom Post Type not appearing in search results?

I am using ACF to create a custom post type (CPT = "books"). I cannot get the CPT to appear in Wordpress search results (I tried both default Elementor search widget and Jetsearch) I have ...
Andrew D's user avatar
1 vote
0 answers
18 views

next_post_link and previous_post_link on custom post type without taxonomy?

I have a super basic custom post type projects that doesn't have any taxonomy. I'm trying to show next/prev post links but they all show incorrect posts. I've tried within and outside the loop, ...
Runnick's user avatar
  • 1,009
0 votes
2 answers
13 views

how to compare date meta value in jet smart filter Date query?

trying to compare meta value between today and next 7 days, tried this in value field %today%, %str_to_time|+ 1 week% but its not working.
vikram's user avatar
  • 1
1 vote
0 answers
24 views

Only allow users (that are not admins) to edit a specific post

I am using a ACF field on the user profile.php to assign a post id to a user. The users need to be able to receive the capability to edit this post, but only this post. They should not be allowed to ...
Klein's user avatar
  • 11
1 vote
0 answers
44 views
+50

How to Make a Custom Results Page for a Custom Post Type with Block Editor

I am new to WordPress, so I am unsure how to accomplish this. I have a custom post type called, fs_ski_resort I created a template called "Archive: FS Ski Resort". The page has a search box,...
spreaderman's user avatar
1 vote
1 answer
14 views

Options of select field in a custom divi module ignore sorting

I made a little custom module for the Divi Builder which allows me to display a specific single post (from a custom post type). This works fine, but the options are not sorted correctly in the builder,...
Comaris's user avatar
  • 11
0 votes
1 answer
16 views

Quering a post object based on another related post object

I have two post types - Ticket and Event Each ticket has a meta called 'event_id' which connects it to an Event. Suppose I want to fetch all events with more than 3 tickets. I want to do it in a ...
mrkarma4ya's user avatar
0 votes
1 answer
42 views

Remove slug and custom post type name from URL

I have a custom post type "treatment", under this CPT the taxonomy "treatment_category" which forntend slug is "category" right now the URL for category displaying as ...
user1419170's user avatar
0 votes
0 answers
9 views

How to Retain Original URLs When Migrating 100 WordPress Posts to BetterDocs Custom Post Type

I'm in the process of migrating approximately 100 WordPress posts to a custom post type designed specifically for documentation, using the BetterDocs plugin. This plugin mandates that all article URLs ...
Stefen's user avatar
  • 1
0 votes
0 answers
17 views

Why using archive pages at all?

I searched through some questions and it was a surprise this never was asked before. I have a lot of customers who maintain there Wordpress sites that i created for them. I often get the question, why ...
LovinQuaQua's user avatar
0 votes
0 answers
9 views

Post URL redirecting to homepage

Please I need help, i have added dynamic content using Pods - Custom Content Types and Fields and the post url button is redirecting me to homepage instead of a single post page.
Cathrine's user avatar
0 votes
0 answers
13 views

Custom Post Type Pagination Showing 404 On archive pages

Trust you are well. I need your help to fix pagination issues for my custom post type archives. At first, it was my homepage but I managed to fix it with a few function codes which I thought would ...
Gabriel Stephen's user avatar
1 vote
1 answer
9 views

Cannot save the contents of a csv file as post_content within wp_update_post

I'm creating a custom WordPress post type to hold the contents of a CSV file so that it can be processed later. The post is created correctly, with all the right information with the exception of the ...
JMouse's user avatar
  • 11
0 votes
1 answer
14 views

Custom post type template not loading from plugin

I've created a custom post type called jdshs_jobs in a plugin and I have tried to get Wordpress to associate a template (single-jdshs_jobs.php) from within in sub-folder: .../plugins/plugin-name/...
Alex Adams's user avatar
0 votes
0 answers
15 views

Display category name and title of last post (in custom post type)

All is in the title of the question. Title here show the name of the page, i want to show the name of the last post, but i don't know how to do it ! Thanks <div class="grid-item"> &...
Ben Belek's user avatar
0 votes
0 answers
8 views

Issues with Ajax Pagination and Filtering

I am creating a website and just can't manage to get the pagination to update when a filter is selected. block.php <section class="photographers full-width-grid mt-<?= $attributes['margin-...
Patrick's user avatar
0 votes
0 answers
10 views

custom post type with metabox custom fields

how to make meta custom fields in custom post type name jobs_board_cpt , I am using boilerplate ? public function jobs_board_cpt() { $labels = array( 'name' => ...
Muhammad Ashfaq's user avatar
0 votes
0 answers
6 views

How to get the proper category in permalink with custom post type assigned to multiple categories

I was wondering if you could help me with the following issue. I have read a lot of cases, but couldn't trace anywhere good answer which explain, how this works. I created a custom post type: project ...
Brango's user avatar
  • 1
0 votes
2 answers
26 views

Set custom post title to read only by user

I need custom post titles on the backend to be Read Only for all users except admin. This looks like it should be easy, but I'm stuck.
BarkingBird's user avatar
0 votes
1 answer
24 views

ACF - Tags not showing up in Custom Post Types

I have a tags taxonomy and then I've added it to my CPT, however it does not give me the option to add tags to my CPT now. How do I get it to do that?
user3382763's user avatar
1 vote
2 answers
26 views

Generate Post Title From ACF Fields on Custom Post Type

I have tried a few versions of the code to get this working and seem to come up with a couple of errors either way. I am using ACF for the fields and adding the below code to the themes functions.php ...
Craig Watson's user avatar
1 vote
0 answers
17 views

Custom post type sub-category pagination return error 404 on second page

I have a custom query as follows: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'programme', 'posts_per_page' =&...
Azman Ishak's user avatar
1 vote
1 answer
21 views

How to add random prefix (based on related page slug) to custom post type?

I want to create some specific url structure for my website. My Pages will be Inner Home pages that will combine articles and reviews. Articles and reviews are 2 separate custom post types. I would ...
Oleksiy Goldayev's user avatar
0 votes
1 answer
30 views

Hide load more button if no more post in selected category

I have built a ajax post loading program in wordpress where i load post depending on category and current post type. ive got it all working except hiding the load more button if no more post. ive been ...
Beep's user avatar
  • 29
0 votes
0 answers
15 views

Passing total post count to javascript

I have a ajax post loading program, I can load more post on click of a button. Problem im having is getting the button to hide or show less when no more post. I can query out the post count in PHP as ...
Beep's user avatar
  • 29
0 votes
1 answer
26 views

Pull total post count for child category and parent if term ID

I have a mess of code that works, however I know its a mess and im sure there is a neater way of doing this. I am trying to get the child category to display under the parent category and for the post ...
Beep's user avatar
  • 29
0 votes
0 answers
100 views

Custom PHP Template in Twenty Twenty-Four

I am trying to use a custom php template in the latest theme and not only it has an file editor, there is no place for me to paste my template file. This is a template file for a custom post type so I ...
Sid's user avatar
  • 129
0 votes
1 answer
14 views

get total post in category via ajx

Aim The total to be equal to the amount of post within the selected category or sub category. What im getting I am getting 0 when trying to get the number of post available in a category. My aim is to ...
Beep's user avatar
  • 29
1 vote
1 answer
29 views

Can't publish custom type posts that don't support title and editor, instead they're saved as draft

I’m developing a plugin that registers custom post types without support for title and editor. I’ve been working on this project for a couple of months now and when I began (WP version 6.3.1), it used ...
user5728578's user avatar
0 votes
0 answers
9 views

Trying to create wordpress pagination and breaking while live [duplicate]

I have been coding a pagination for my WordPress site, for a custom post query. and while it works just fine in my local machine it breaks online. I get a 404 when trying to click on page 2, while ...
Ivan Bezerra's user avatar
1 vote
2 answers
25 views

add_post_meta unique value for all custom posts

I have a custom post type "Propietario" with several custom fields, and 3 of them: "dni", "email" and "phone" I need unique for all Propietario Post types. This ...
JJMontalban's user avatar
0 votes
1 answer
53 views

Custom post type pagination not working in index.php file

I have created a custom post type called news Here is the code function create_post_type_news() { $supports = array( 'title', // post title 'editor', // post content 'author', // post author '...
Vivek Saha's user avatar
1 vote
1 answer
11 views

Display box in sidebar of custom post type

I have a plugin I've written that displays ratings on various pages on my site. It's shortcode based and just drops in on any given page [mm-rating] It draws from a field provided by the WP SSO ...
commadelimited's user avatar
0 votes
1 answer
22 views

CPT without slug after domain mapping

I made a custom solution where two domains are mapped on single site, part of the pages are mapped to one domain and part to another. I used "Multidomain mapping on single site" plugin for ...
Lovor's user avatar
  • 901
0 votes
1 answer
74 views

WP_Query for multiple post types just shows one

I have an issue, that I do not really understand. I hope, you can help me. I would like to have a WP_query for multiple post types: $query = array( 'category_name' => $category, 'post_type' =&...
wepli23's user avatar
0 votes
1 answer
23 views

How to disable the single view / search /archive page for a already-built custom post type?

There is a plugin that adds a custom post type called "magicai-documents". I want to disable the single view, search, and archive pages (every area of frontend) for an already-built custom ...
Ranuka's user avatar
  • 1,784
0 votes
1 answer
15 views

Loop through categores and posts of a custom post type in WordPress?

I've created a custom post type called faq in WordPress and I've created a few categories for it - like "Billing" and "Shipping". My end goal is to create multiple FAQ "Posts&...
Sackadelic's user avatar
0 votes
0 answers
27 views

Hot to show custom post type taxonomies on archive page

I have a custom port type 'apartments' and each apartment has several parametres which I made into custom taxonomies, like 'number of rooms', 'area', 'region', 'status', etc. The task is to show all ...
Ava Northon's user avatar
0 votes
0 answers
9 views

How to best assign choices to CPT posts and allow filtering on frontend

Looking for suggestions on how best to achieve my goals for assigning filters to posts and using those when searching for service providers. I have created a CPT: Service Providers I want to allow ...
php-b-grader's user avatar
1 vote
1 answer
13 views

Custom Post Type - archive working - single is not

So I'm really at my wits end here. I'm trying to get the single page working for my custom post type. I've done it several times now, but right now its just not working (404 - not found). I hope I ...
Keanu1989's user avatar
0 votes
0 answers
9 views

Integrate a Custom Post Type with Learndash Plugin

I've registered a custom post type already in wordpress. I am looking for a solution to display that custom post type in learndash course Hierarchy.
Shaharyar Ansari's user avatar
1 vote
2 answers
35 views

Сustom posts are displayed in the wrong menus

I have created two post types, but the problem is that both post types are shown in both menu menu of admin panel regardless of their type, and they are both shown in the standard posts menu. I would ...
upkagefa's user avatar
1 vote
0 answers
12 views

Frontend delete CPT post with custom role user

I am building a custom frontend where custom role members (created with User Role Editor) can add and edit spots. "Spots" are a custom post type registered like this: register_post_type('...
gl03's user avatar
  • 111

1
2 3 4 5
207