Skip Navigation

[Resolved] Loading the archive of a custom post type gives a white page, the rest works

This thread is resolved. Here is a description of the problem and solution.

Problem:
Create a simple custom post type to display projects on a website. Everything works as expected except when I try to access the archive via the post slug, get a blank white page with nothing to see.

Solution:
I assume we are talking about the child theme "parallax-pro", please check the theme file "index.php" in the child theme folder "parallax-pro", you are using below PHP codes:

<?php
// Silence is golden.

it will display the wordpress archive page as a blank page, you can simply remove this file and test again.
Relevant Documentation:
https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/#custom-post-type-templates

This support ticket is created 6 years, 9 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by Arne 6 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#560105

I am trying to: create a simple custom post type to display projects on a website. Everything works as expected except when I try to access the archive via the post slug

Link to a page where the issue can be seen: see the details below

I expected to see: The archive of the post type template that I created

Instead, I got: a blank white page with nothing to see

#560184

Dear Arne,

It is abnormal, if you get a blank page, that means there are some PHP errors in your website, please check these:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) Enable PHP debug mode, copy and paste the debug logs here
PHP Debugging
In case you think that Types or Views are doing something wrong (what we call a bug), you should enable PHP error logging. Again, edit your wp-config.php file and add the following:

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
This will produce a file called ‘error_log.txt’ in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, user www-data).
https://toolset.com/documentation/user-guides/debugging-types-and-views/

#560222

Dear Luo,

thank you for your help. Your advice to switch themes helped to find out it the issue is related to the theme but I have yet to figure out where the problem starts. I inserted the code in my wp-config file but no file is being created, checked if my server if shows php errors, it should. Do you have another hint on how to circle in on the issue?

In my thinking this is related to me customizing a childtheme (even renaming it) but I just finished a very similar project with no issues at all hence my confusion. If this issue from here on is not covered by your support policy, then just let me know.

Arne

#560265

We can help you to locate the problem, since it is a compatibility problem between your theme and Types plugin, please provide a downloadable URL for your theme files(Both parent theme and child theme) in below private detail box, I need to duplicate same problem and debug it in my localhost, thanks

#560284
#560663

Thanks for the details, I am downloading the file, will feedback if there is anything found

#560673

I assume we are talking about the child theme "parallax-pro", please check the theme file "index.php" in the child theme folder "parallax-pro", you are using below PHP codes:

<?php
// Silence is golden.

it will display the wordpress archive page as a blank page, you can simply remove this file and test again.

More help:
https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/#custom-post-type-templates

The index.php is used if a specific query template (single-{post-type}.php, single.php, archive-{post-type}.php, archive.php, search.php) for the custom post type is not present.

#560690

Luo, thank you for your help. This resolved the issue and I learned something today.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.