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
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/
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
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
Thanks for the details, I am downloading the file, will feedback if there is anything found
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.
Luo, thank you for your help. This resolved the issue and I learned something today.