I updated Toolset plugins today and got several errors which seem to effect the frontend of my site as well. All my archives were in three columns are not the columns are gone. These errors are showing when I long into the WP Admin.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'my_cptui_add_post_types_to_archives' not found or invalid function name in /home/customer/www/eatingbyelaine.com/public_html/wp-includes/class-wp-hook.php on line 287
Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/eatingbyelaine.com/public_html/wp-includes/class-wp-hook.php:287) in /home/customer/www/eatingbyelaine.com/public_html/wp-includes/functions.php on line 6270
Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/eatingbyelaine.com/public_html/wp-includes/class-wp-hook.php:287) in /home/customer/www/eatingbyelaine.com/public_html/wp-admin/admin-header.php on line 9
I am unsure if I need to actually grant access, since this happened after an update.
Hello,
There isn't any PHP function using name "my_cptui_add_post_types_to_archives" within Toolset plugins, so the problem you mentioned above is abnormal, please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP code snippets, and test again
2) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
I took the following line of code out of my functions.php file in my theme folder and that removed the errors:
add_filter( 'pre_get_posts', 'my_cptui_add_post_types_to_archives' );
I am unsure if this code is needed for now.
I am still having issues on the front end. All my archives are now not showing in three columns without styling when logged out. When logged in everything looks fine. I am unsure why this is happening. hidden link
I have checked the URL you mentioned above:
hidden link
It is displaying three columns, and I don't see any PHP errors, see my screenshot: fall.JPG
Is this problem resolved, please let me know if you need more assistance for it, thanks