Hide price, “add to cart” button and show message “Please log in to shop” [closed]

Just put some conditionals where you render your button. You’ll also need to figure out which page you’re on. if($is_single_product_page) { if( ! is_user_logged_in()) { ?> <div class=”message”>Please log in first</div> <?php } else { // end is_user_logged_in/false ?> <button class=”btn”>add to cart</button> <?php } // end is_user_logged_in/true }

How to use Virtual Private Server as WordPress Image CDN

It sounds you want to do something similar as described in this article https://surpriseazwebservices.com/serve-images-from-sub-domain-in-wordpress/. You’ll need to define your upload_url_path as your private server and also update the path of your existing images by running the following query in MySQL. UPDATE wp_posts SET post_content = REPLACE (post_content,’http://yoursite.com/wp-content/uploads/’,’http://img.yoursite.com/’); The steps should all be documented in the … Read more