Skip to main content

Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Remove `View post` Text

How to remove View post from this message ? My code is like below. public function game_updated_messages( $messages ) { $messages['game'] = $messages['post']; $messages['game'][...
Foysal's user avatar
  • 449
0 votes
0 answers
19 views

Redirect to All Custom post types

I am learning plugin development. How to redirect to All Custom post types page after insert a New Custom post type ?
Foysal's user avatar
  • 449
0 votes
0 answers
8 views

I am having a problem with fetching product data in the Gutenberg block editor

const allProducts = useSelect((select) => { return select('core').getEntityRecords('postType', 'product', { per_page: -1, _embed: true, }); }, [postPerPage, orderBy, order]); console.log(...
Sifat's user avatar
  • 1
0 votes
0 answers
13 views

Multiple search forms and respective results page templates?

I have a Woocommerce site and I would like to set up two different search forms, one for products and one for everything else (pages, posts, and a couple CPTs) that would render on it's own respective ...
Ryan M Vickerman's user avatar
0 votes
0 answers
16 views

Remove date rewrite rule for custom post type archive page

I'm building a website with an archive page where I can filter posts by date (year and month) and by term. I'm using wordpress url params to display filtered posts. The filtered url looks like that : ...
Pof's user avatar
  • 111
0 votes
0 answers
16 views

Same Custom Post Type Slug and Custom Taxonomy Slug, with hierarchial unique permalink structure

I am new to wordpress custom post type and re-writing urls'. I have created a Custom Post Type with slug 'industry' further re-writen to 'industries' and Custom Taxonomy associated to it with same ...
divy3993's user avatar
  • 103
0 votes
0 answers
20 views

How can I allow plugin users to define layouts for a custom post type

Note that this is all within a plugin if it makes a difference. What I want to achieve... I have a custom post type defined, with some related taxonomies. I would like to allow site admins to define ...
zcesl53's user avatar
  • 33
0 votes
0 answers
18 views

CPT meta values intermittently return empty

I have a parent CPT (Form) and a child CPT (Registration). Form A currently has around 3,000 child registration posts. Am showing them on a custom admin table, 20 posts per page. The table columns ...
AncientRo's user avatar
  • 366
0 votes
1 answer
12 views

CPT with URL rewrite showing as 404

I have a unique issue with URL structures on a custom post type. I'm using CPTUI plugin to create a "product" post type. This works well enough on it's own. But in order to follow site ...
AlexM's user avatar
  • 101
0 votes
0 answers
42 views

"Page not found" while on page 2 from pagination menu

all. I'm getting a "Page not found" message in my firefox tab when I click page 2 in my pagination menu. What's odd is, the content shows up just fine on all paginated pages. I've tried ...
harshclimate's user avatar
0 votes
2 answers
65 views

fetch from an external api call and display results in page

I have placed my external api call inside the functions.php file in the server and I created a shortcode for the api call. I'm familiar with React and I was expecting Wordpress to be somewhat similar. ...
bart lu's user avatar
0 votes
1 answer
18 views

Editor or custom field for Latex source code page

I plan to publish latex code on WordPress. My VPS has a full installation of texlive and my WordPress will call xelatex or pdflatex to generate pdf, and my WordPress will also call pandoc to generate ...
Gqqnbig's user avatar
  • 165
0 votes
1 answer
39 views

WordPress CPT & Custom Taxonomy with the SAME Permalink Structure

I have a CPT: 'Guide' and Custom Taxonomy 'Guide Category'. What I want to achieve is: The CPT permalink structure is: example.com/guides/custom-taxonomy/post-name/ So that the following should ...
Elgameel's user avatar
0 votes
2 answers
23 views

How to get Custom Post Type (CPT) Archive Page's Posts Featured Images Preload in header.php

I am trying to Preload all Images of the Custom Post Type Archive Page's Posts Featured Images Only. Mean in header.php I want to set code in and implementation should only be on the Custom Archive ...
Islamic Quran Center's user avatar
0 votes
1 answer
22 views

My custom meta box with textarea field not saved

I created a custom meta box for my custom post type with address, phone, and map but only the map field type textarea not saved. My code here: // Add meta box function vn_store_add_meta_box() { ...
Quốc An Trần's user avatar
0 votes
0 answers
20 views

Add Shortcode functionality to a function that queries custom post type / taxonomy

How to output a UL of items and URLS for custom taxonomy? The plugin 'CPT UI' (Custom Post Type UI) is very good at creating custom post types. I have created a post type called 'Towns' that has a ...
Adam Fletcher's user avatar
0 votes
0 answers
21 views

Custom Post type with a sub-URL under another Custom Post Type

I have some custom post types, which are cities. These are located at /c/{postalcode}-{cityname} Not I have some categories, which is a kind of filter "under" these cities - and the UX-flow ...
denlau's user avatar
  • 103
0 votes
1 answer
30 views

Drawbacks of making the default post-type: post hierarchical [closed]

I want to know about all the drawbacks and consequences/errors I might face if I make the WordPress's default post-type: post, hierarchical. Is it recommended? I have a requirement where I need to ...
Deba Banerjee's user avatar
0 votes
0 answers
14 views

Convert dynamic jetpopup to a dynamic page

I have a problem that I have been trying to solve, but I can't find the way. I have taken a website created by someone else and I am having to make changes on it, so I do not know how some things are ...
Oscar Ariño Montero's user avatar
0 votes
0 answers
13 views

Integrate the second most recent custom post into the Wordpress blog

I have a Wordpress blog with regular posts on the homepage of my website. But I have a custom post type called "buildings_post_type". And I want the second and third most recently published ...
Michael's user avatar
0 votes
0 answers
17 views

How to change layout of post types templates dynamically for separate posts?

I have created a post type in Elementor, but I want to make some changes in each separate post,eg, change the number of table rows and columns, loop grid content, archives content, etc ,how can I do ...
user242621's user avatar
0 votes
2 answers
20 views

How to build help pages similar to Wordpress Developer Resources

We need to build a help page similar to Wordpress Developer Resources (see the screenshot below). We're problably looking for a developer solution as we haven't found any plugin that would fit our ...
Łukasz Korona's user avatar
1 vote
1 answer
29 views

How do I know if an archive correspond to a custom post type taxonomy?

I am new to php and Wordpress. I currently have custom type named "helppost" that should hold Help posts. It has three categories: 'Getting Started' with slug "getting-started" '...
Aimn's user avatar
  • 11
1 vote
1 answer
30 views

Many CPT is conflicting of the custom date

How can I fix the date with multiple Wordpress CPT date? An example, the custom post "John The Man" on "Canada" CPT the birthday is "Thursday 05 May 1960". How can I ...
Oldie's user avatar
  • 11
0 votes
1 answer
26 views

WP_Query not using relation key as expected and not producing any results

I have created a custom post type service-provider with custom taxonomies region and service-category - By itself, this search works as expected BUT I want to also search on an ACF field. I have an ...
php-b-grader's user avatar
1 vote
0 answers
11 views

Help with right recipe ierarchy post type and taxonomy

I need to make right ierarchy. But with my setting I get 404. How I can do that with settings post-type, taxonomies, rewrite-rule? What I need: sitename/media/%posttype% -- sitename/media/recipes ...
Vasyl's user avatar
  • 11
2 votes
1 answer
35 views

How to include Font Awesome icons into 'menu_icon' from register_post_type() function - wp admin?

I would like to use font awesome icons instead of dashicons inside menu_icons argument of register_post_type() function or for add_menu_page() icon argument. I have found another page that suggest to ...
imagIne's user avatar
  • 83
1 vote
0 answers
28 views

Is "Contributor" a safe custom type name?

I am developing a site that contains essays and events. I want to create a custom post type to give each essay author and event speaker their own entry. I know that "author" is a reserved ...
Barbas's user avatar
  • 11
1 vote
2 answers
58 views

Custom Post Types in WordPress Dashboard List Rows But Data is Blank

I have a WordPress site that has several custom post types. Recently I moved it to Amazon Lightsail hosting which I've used for years. After the move, all my post types appear in the dashboard but ...
elke_wtf's user avatar
  • 383
0 votes
0 answers
20 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
33 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
1 vote
0 answers
22 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
1 vote
0 answers
15 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
19 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
41 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
23 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,029
0 votes
2 answers
41 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
30 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
2 votes
2 answers
116 views

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
38 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
21 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
67 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
13 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
23 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
15 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
19 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
14 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
69 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
18 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
13 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

1
2 3 4 5
208