Add error message on password protected page ONLY when password introduced was incorrect

I know this has been discussed in a couple of other posts but none of them seem to have the correct answer/solution to the question. I tried using all the suggested functions mentioned in the other posts but none seem to work. When a wrong password is introduced nothing happens(just the standard redirect to the same page) The only one getting close to the answer is the following code provided by toscho on this thread – Add error message on password protected page but unfortunately the error message shows regardless…

Schedule reminder at exact time

I have event website. I want send reminder about event exactly 2 hours before the event to subscribers. So how can schedule wordpress to call the function exactly at time. I know about wp_schedule and cron. But that doesn’t helps me. Don’t recommend plugins. Because I am developing custom plugin. So what is the correct way to do that. Example: if event start time is today 11:30 pm , I want to remind the event subscribers at exactly 9:30 pm. Source: https://wordpress.stackexchange.com/feeds

How to remove admin menu pages inserted by plugins and themes in the top admin bar?

How do I find out the correct hooks that are being used when installed plugins and themes insert their own menus into the WordPress admin top menu bar? I know how to remove them from the admin sidebar from the following the instructions in the following post How to remove admin menu pages inserted by plugins? but it doesn’t explain how to find the ones when they’re inserted into the top admin bar. I’m specifically wanting to remove the Avada link from the top admin menu bar if anyone can…

Change multiple WooCommerce Add to Cart Button Text

I’m trying to target a few of our WooCommerce product pages « Add to Cart » buttons to say different things. This code works for targeting one product and leaving the rest default: add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_cart_button_text’ ); function woo_custom_cart_button_text( $text ) { global $product; if ( 123 === $product->id ) { $text = ‘Product 123 text’; } return $text; } I tried adding an elseif statement after the first if but it’s not resolving: add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woo_custom_cart_button_text’ ); // CHANGES INLINE BUY BTN BANNER add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_cart_button_text’ ); // CHANGES SINGLE PRODUCT…

Web Design Weekly #260

Headlines Offline UX Considerations This article by Mustafa Kurtuldu looks at multiple design considerations needed to create a great experience on both slow networks and offline. (developers.google.com) Debugging The Web (youtube.com) Starbis – Flexible Bootstrap Theme Created by the industry leaders, Starbis Bootstrap theme includes a comprehensive set of tools which are super easy to pick up and run. This template gives you a huge leg up to create your own beautiful site using powerful options & tools, unlimited designs, and responsive framework. (templatemonster.com) Articles Adding and Leveraging a CDN…

Input data from email form not going to JSON file

I have added an email input / form to my WordPress page and want to collect the information from this as JSON data. The HTML code is: <form method= »get »><p id= »myform »><input type= »email » name= »EMAIL » placeholder= »enter email address » required /> <input id= »submit » type= »submit » value= »Sign up » /></p></form> The php, which is in my functions.php file, is: if (isset($_POST[‘submit’])) { $file = « data.json »; $json_string = json_encode($_POST, JSON_PRETTY_PRINT); file_put_contents($file, $json_string, FILE_APPEND); } I have a data.json file, which is being referenced in the php part of the above code, which sits at the first level of…

Custom post status

I am trying to work out how to add a set of new publish statuses to custom post types in wordpress as I would like to do the following: User signs in and uses the custom post type to fill in the information fields upon completion the post type should be set to awaiting approval and only viewable but not editable by the user then an admin should be able to set the status of approved (user can then not edit post after this status is set) or set to…

Remove post meta keys

I’ve got a lot of post meta keys that I no longer use, and I’m trying to work out how to delete them so they no longer show in the custom fields list in the admin panel. This code will delete the post meta values: function hp_batch_delete_post_meta(){ // get array of all post ids $post_ids = get_posts( array( ‘numberposts’ => -1, ‘fields’ => ‘ids’, ‘post_type’ => array(‘ad_upload’,’post’, ‘page’), ‘post_status’ => array(‘publish’, ‘auto-draft’, ‘trash’, ‘pending’, ‘draft’), ) ); // remove post meta for each post foreach( $post_ids as $post_id ) {…

Show image crop window on image upload

I’m trying to add image from front end and crop it after upload. Used setState( ‘cropper’ ); to enable image crop window. It open the image upload window. Upload an image. But, Not open Image Crop window. Reference from https://core.trac.wordpress.org/browser/tags/4.6/src/wp-admin/js/customize-controls.js#L2449 Add Shortcode: [frontend-image-upload] function frontend_image_upload() { wp_enqueue_media(); wp_enqueue_script( ‘media-grid’ ); wp_enqueue_script( ‘media’ ); wp_enqueue_script( ‘frontend-image-upload’, plugins_url( ‘../assets/js/frontend-image-upload.js’, __FILE__ ), array( ‘jquery’, ‘media-upload’ ), NULL, true); } add_action( ‘wp_enqueue_scripts’, ‘frontend_image_upload’ ); add_shortcode(‘frontend-image-upload’, function() { ob_start(); ?> <button class= »frontend-image-upload »>File Open</button> <?php return ob_get_clean(); } ); File: frontend-image-upload.js jQuery(document).ready(function($) { jQuery(‘.frontend-image-upload’).click(function(event) { event.preventDefault();…