Skip Navigation

[Resolved] Custom Post Type Archive is failing

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by maxfieldB 5 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1348595
Screen Shot 2019-09-25 at 9.33.33 PM.png

I am trying to:
Create an archive for my custom post-type, K-12

Link to a page where the issue can be seen:
hidden link

I expected to see:
An archive of my custom post

Instead, I got:
An empty page

Also, please notice that the attached image, shows an error when I try to create this custom post type.

#1348649

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Those errors show that the contents of the Loop Editor have been edited in such a way that the key markup, including the shortcodes and markup described in the error itself, has been modified or deleted.

The basic structure of the Loop Output section looks like this:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
          <!-- content for each result goes here -->
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

I suggest you use the Loop Wizard and it will regenerate the required markup together with the fields you add, and that should then work when visiting the archive on the front end.

#1350675

Hello,

I have tried the loop editor, but it continues to generate code that produces the same red errors as above. When I post your code, I don't get any errors, but the archive page is still blank.

How can I troubleshoot from here? Should I provide a login for you to check out this issue?

Thank you!

#1351239

Just as clarification - the custom post type for my *other* post type, "Adult Programs," is working, it's just that the k-12 one is failing.

Thanks!
Max

#1351473

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

HI Max

The code I posted is just the scaffolding required in the Loop Editor, it doesn't output any content, so pasting that will give you a blank archive, yes.

You should be able to set up the archive with the Loop Wizard which will add the fields you want to output while maintaining the required scaffolding.

Does that not work? Are there errors on the page (JavaScript errors in the browser console)?

I can take a look, let me set a private reply for you to get your site credentials. Please ensure you have a current backup.

#1353205

Hello,

Yes, thank you so much. I have followed your instructions but unfortunately both the archive *and* content template are failing for our custom post category, "K-12" providing login here, can you please take a look?

I have already taken a backup of this site.

Thanks so much!

#1353855

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Max

The issue seems to be related to your theme. I switched to twentynineteen and the archive displayed correctly.

So I added the attribute suppress_filters="true" to the wpv-post-body shortcode in the output section of the archive, and that appears to have fixed the issue with your theme.

While using this theme you may find you need to add that attribute whenever you are inserting a wpv-post-body shortcode.

#1354415
Screen Shot 2019-10-02 at 2.58.49 PM.png
Screen Shot 2019-10-02 at 2.58.41 PM.png

Hi there,

I don't think this issue is related to my theme. I switched over myself, to 2019, and I am still seeing blank maps on the homepage and also the archives, instead of the list of places that have been entered.

I'm attaching pictures.

Can you help me troubleshoot this further?

Max

#1354941

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, by "correctly" I meant it was displaying anything at all, which it wasn't with your own theme.

Now it sounds like an issue about maps not displaying their markers.

But looking again, it seems to be working, I see the map with markers on the homepage (I also answered your other ticket about the zoom level, which is the same site).

So it looks like you resolved this yourself in the meantime?

#1356133

Thank you Nigel - yes, I believe the issue seems to have just fixed by itself - however I think I know how to fix this in the future, as well.

Thank you for your help!

Max