- This topic has 6 replies, 3 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
February 8, 2023 at 12:36 pm #2526378
Matthew
I created two custom post types. Identical custom fields. Identical Elements to create the posts (two separate elements). And identical landing pages (two separate landing pages) to display all the custom posts for each. The only difference is the terminology and labeling. For example, one is for ebooks, and the other is for templates.
For templates build: The landing page and the element that use a query loop (the templates custom post being the data source) both show “No results found” when I click on the query loop block. And I can no longer edit anything within this block.
For ebooks build: Zero issues. The only difference is the query loop selects its custom post type for the data source.
Both templates and ebooks output as expected on the front end flawlessly.
What’s wrong with the templates build? Why “No results found”?
Any quick recommendations? I have looked over the custom post types and the custom fields carefully. Can’t see any difference between how I created the two.
Very simple custom post types with few custom fields.
February 8, 2023 at 6:00 pm #2526598Fernando Customer Support
Hi Matthew,
Are both CPTs set to show in the REST API?
If so, can you provide admin login credentials so we can take a closer look at the issue?
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
February 9, 2023 at 7:00 am #2527172Matthew
Yes, both CPTs set to show in the REST API.
February 9, 2023 at 9:20 am #2527514David
StaffCustomer SupportHi there,
could it be the
templatesslug ? what if you name it something less generic ( my concern is that something in WP backend may also be using that ) eg.custom-templatesFebruary 9, 2023 at 9:44 am #2527547Matthew
There were pages using the URLS /ebooks and /templates.
When I created the CPT slugs (ebooks and templates), I was not blocked from doing so.
When I tried to create the CPT slug webinars, I was prevented and told to choose a different slug (since /webinars existed as a page). So, I did. And that CPT and GeneratePress work fine.
So, yeah, maybe, the templates slug should be cm-templates or anything different to prevent the issue.
It’s just weird that I wasn’t blocked from using CPT slugs ebooks and templates when I created those CPTs given the pages existed. Perhaps those pages (/ebooks and /templates) were drafted at that moment. Not sure.
February 9, 2023 at 10:10 am #2527572Matthew
Yeah, that seemed to clear it up. Thank you.
February 10, 2023 at 2:48 am #2528241David
StaffCustomer SupportGlad to hear that it is now working 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.