How to Post an Announcement to Your Website in Under 5 Minutes

Lots of business websites need to post a quick announcement. Maybe you’re closing for a holiday, maybe a major storm is causing problems, or maybe you’ve got a limited time special to announce. Whatever the reason, we get a lot of requests to add a simple announcement to websites. So here’s a simple and fast way to add an announcement to your WordPress website.

How to Select the Right Managed WordPress Hosting Company for You

There are a lot of companies out there offering managed WordPress hosting now, but the question is, who’s the right company for your needs? I’ve been working with WPEngine, Flywheel, GoDaddy, and Kinsta managed WP hosting for a few years now, so here’s my analysis of the companies and why they would or wouldn’t be a good choice for you. All of these companies have multiple levels of plans, so I’ve selected the plans most useful for a typical small business website. First Disclaimer: The below opinions are our own, you should always consider multiple sources when choosing a provider. Second Disclaimer: All hosting companies offer a referral program, if you found the information here valuable, please consider clicking on my links – referral programs help pay for the time it takes to write up these in depth articles.

WooCommerce Code Snippets

This post with WooCommerce code snippets is mostly for myself, but I also answer questions at the WooCommerce Community Boards periodically, and this list of snippets can be useful for answering those questions. /** * Remove WooCommerce Updater Notice */ remove_action(‘admin_notices’, ‘woothemes_updater_notice’); /** * Code to fix HTTP Error on uploads */ add_filter( ‘wp_image_editors’, ‘change_graphic_lib’ ); function change_graphic_lib($array) { return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ ); } /************* DECLARE WOOCOMMERCE SUPPORT ***************/ add_action( ‘after_setup_theme’, ‘woocommerce_support’ ); function woocommerce_support() { add_theme_support( ‘woocommerce’ ); } /*** * Add notice to WooCommerce pages */ function my_update_notice() { echo ‘<div class=”update-nag notice”>’; echo ‘<p>’; _e( ‘In order for Room View to work properly with your artwork, you must enter your artwork size as HEIGHT by WIDTH. For example if you have a painting that is 20cm tall and 40cm wide, you would select your size as 020 x 40 cm’, ‘anphira’ ); echo ‘</p>’; echo ‘</div>’; } add_action( ‘admin_notices’, ‘my_update_notice’ ); /*********************************** * Require image to publish product ***********************************/ function on_all_status_transitions( $new_status, $old_status, $post ) { /* If new status is draft and post type is product, then set original to manage stock & qty to 1 */ if ( $new_status == ‘draft’ && !empty($post->ID) && in_array( $post->post_type, array( ‘product’) ) ) { $post = wc_get_product( $post->ID ); if($post->get_type() == ‘variable’) { $variations = $post->get_available_variations(); foreach ($variations as $variation) { if( ( ! isset( $variation->manage_stock ) || ($variation->manage_stock == ‘no’ ) ) && ($variation[‘attributes’][‘attribute_pa_type-slug’] == ‘original’) ) { add_post_meta( $variation->id, ‘_stock’, 1, true ); update_post_meta( $variation[‘variation_id’], ‘_stock’, ‘1’); update_post_meta( $variation[‘variation_id’], ‘_stock_status’, ‘instock’); update_post_meta( $variation[‘variation_id’], ‘_manage_stock’, ‘yes’); } } } } /* If new status is publish and post type is product, then require featured image */ elseif ( $new_status == ‘publish’ && !empty($post->ID) && in_array( $post->post_type, array( ‘product’) ) ) { if( ! has_post_thumbnail($post) ) {

Read More

A/B Testing with Google Experiments on WordPress

A/B testing is getting more and more popular, but typically in order to do so you had to add plugins to your site or use third party services. Now with Google Experiments, Google has integrated A/B testing right into their Analytics platform. What that means is you can easily test variations of your pages and have let Google use the data from your website to determine the winner.