Checkbox show / hide output result

For saving the checkbox, one easy way to check, if the checkbox was checked is to use empty() function. The checkbox key and value exists in $_POST only, if it was checked when the form was submitted. For example, function snup_save_meta($post_id) { // nonce check etc. // save text $snupText = $_POST[‘snuptext’] ?? ”; update_post_meta( … Read more

Updated to PHP 8.0 and WordPress site not working

You cannot change something in the referenced file, since it’s part of the core. Ok, technically you can, but you really really shouldn’t. Even the latest wordpress is not yet production-ready to be compatible with PHP 8 – https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/ However, wordpress 5.6+ is beta-compatible, so your best course of action is to upgrade wordpress. If … Read more