1

I never cleared the cache on my machine so the changes were not reflected on my site as it was loading a cached version of the webpage, but once I cleared my cache I then saw the changes.


1

Here is the solution. To set it up: Paste the following at the bottom of the file functions.php in the folder of your current theme. Edit by the 🟢 in the code` $when_on_one_of_these_page_slugs should be an array of strings. The strings are the slugs of the pages on where you want the rule to kick in. The script will kick in the rule if you are on: One of ...


1

The best thing to do here is use the tools that WordPress has provided for you to construct your URLs. In this solution you're building an array of URL parameters with keys and values, then you're "attaching" these parameters to the array using add_query_arg. You can reuse this approach for all your URLs, and simply add/adjust your $parameters ...


1

Your checkbox data is saved as 1 or '' if someone checked or unchecked it. you can also verify this using var_dump($checkbox) inside custom_checkbox_field_html function This should work. function custom_checkbox_field_html(){ $checkbox = get_option( 'disabletitle_text' ); $is_checked = ( $checkbox != '' && $checkbox == 1 ) ? 'checked': ''; ...


1

add these lines in your 'functions.php', it will work //if not gutenberg reapprove posts add_filter( 'wp_insert_post_data', 're_aprove', '99', 2 ); function re_aprove( $data, $postarr ) { //check if current user is not admin if ( ! current_user_can( 'manage_options' ) ) { if ( 'publish' === $data['post_status'] ) { $data['...


1

From just looking at your snippet you're not actually setting $post_revisions to any value before assigning it to your $post_data array


1

Apply the following fixes (those with the // Fix <number>: comment) and your code would work in that only one random folder that will be created for all the uploads in the current session: (Note: I presumed the $countfiles is properly defined in your actual code.) function file_upload_callback() { global $wpdb; $table_name = '...


1

There are a few things omitted in the above solution, like defining the most params of wp_mail. Also I didn't want to send yet another concurrent email, but instead attach the csv directly to the mail that wpcf7 sends. I think this is the cleaner solution. Here's my take: add_filter( 'wpcf7_before_send_mail', 'add_form_as_attachment', 10, 3 ); function ...


Only top voted, non community-wiki answers of a minimum length are eligible