504/502 errors plauging our site

If you think a plugin is causing the problem, disable all plugins by renaming the wp-content/plugins folder. Then put the plugins (in the subfolders of wp-content/plugins) back into a new wp-content/plugins folder. Do a couple/three at a time to see if you can find a bad plugin. You might also reload WP 4.7.2 via the … Read more

Hook for single product thumbnail

Here’s what I believe is an updated version of one of the other answers’ comments. This function replaces the width and height attributes, but OP wanted to change the src. I imagine the solution would be similar, except using preg_replace to replace the src instead. add_action(‘woocommerce_single_product_image_thumbnail_html’,’remove_single_product_image_attrs’,10,2); function remove_single_product_image_attrs( $sprintf, $post_id ){ return preg_replace( ‘/(width|height)=”\d*”\s/’, “”, … Read more

How to add plus minus button on Input Quantity box Woocommerce? [closed]

Below code snippet will display Plus & Minus Quantity Buttons @ WooCommerce Single Product Page. Reference /** * @snippet Plus Minus Quantity Buttons @ WooCommerce Single Product Page * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @sourcecode https://businessbloomer.com/?p=90052 * @author Rodolfo Melogli * @compatible WooCommerce 3.5.1 * @donate $9 https://businessbloomer.com/bloomer-armada/ */ // ————- // 1. Show … Read more

WordPress create permalink structure for custom post type with userid

From this question: You can do this with a couple of filters: <?php function wpse_112719_pre_post_link( $permalink, $post, $leavename ) { if ( strpos( $permalink, ‘%author%’ ) !== false ) { $authordata = get_userdata( $post->post_author ); $author_id = $authordata->ID; $permalink = str_replace( ‘%author%’, $author_id, $permalink ); } return $permalink; } add_filter( ‘pre_post_link’, ‘wpse_112719_pre_post_link’, 10, 3 ); … Read more