Title: dfcdev's Replies | WordPress.org

---

# dfcdev

  [  ](https://wordpress.org/support/users/dfcdev/)

 *   [Profile](https://wordpress.org/support/users/dfcdev/)
 *   [Topics Started](https://wordpress.org/support/users/dfcdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dfcdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dfcdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dfcdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dfcdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dfcdev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Products page with no products](https://wordpress.org/support/topic/products-page-with-no-products/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [4 years ago](https://wordpress.org/support/topic/products-page-with-no-products/#post-15689753)
 * Hi again, i was able to revert my website back to WP 5.9.3 (the previous version
   that was installed) and all seems to be running ok now!
 * I thought i would share this link which shows you a step-by-step process on how
   to re-vert back to a previous WP version, using a couple of plugins, see below:
 * [https://blogvault.net/downgrade-wordpress-to-previous-version-quickly/](https://blogvault.net/downgrade-wordpress-to-previous-version-quickly/)
    -  This reply was modified 4 years ago by [dfcdev](https://wordpress.org/support/users/dfcdev/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Products page with no products](https://wordpress.org/support/topic/products-page-with-no-products/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [4 years ago](https://wordpress.org/support/topic/products-page-with-no-products/#post-15689462)
 * I have already reviewed and have tested per the “WordPress 6.0 Master List” and
   to no avail! Pls advise, thank you!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [site logos on product categories](https://wordpress.org/support/topic/site-logos-on-product-categories/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/site-logos-on-product-categories/#post-12504751)
 * ok i found a workaround and actually MORE than a workaround for this topic, so
   i thought i would share this with the community in case anyone needs help with
   this!
 * So basically the following code, when added to your child theme functions.php
   file, passes the parameter of the product category slug onto the <body> tags 
   of your theme template, what this allows you to do is to uniquely style any of
   your .css components per product/blog/page categories, pretty cool too! see code
   below and feel free to email me for any clarification:
 * function woo_custom_taxonomy_in_body_class( $classes ){
    $custom_terms = get_the_terms(
   0, ‘product_cat’); if ($custom_terms) { foreach ($custom_terms as $custom_term){
 *  // Check if the parent category exists:
    if( $custom_term->parent > 0 ) { //
   Get the parent product category: $parent = get_term( $custom_term->parent, ‘product_cat’);//
   Append the parent class: if ( ! is_wp_error( $parent ) ) $classes[] = ‘product_parent_cat_’.
   $parent->slug; }
 *  $classes[] = ‘product_cat_’ . $custom_term->slug;
    } } return $classes; }
 * add_filter( ‘body_class’, ‘woo_custom_taxonomy_in_body_class’ );
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [site logos on product categories](https://wordpress.org/support/topic/site-logos-on-product-categories/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/site-logos-on-product-categories/#post-12488576)
 * there is no option for a custom header, anyway of coding this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce – displaying item sku’s on product-category pages](https://wordpress.org/support/topic/woocommerce-displaying-item-skus-on-product-category-pages-2/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/woocommerce-displaying-item-skus-on-product-category-pages-2/#post-11787090)
 * I figured this out! See “echo ‘<span style=”color:#ffffff”;>Style#: ‘. $product-
   >get_sku() . ‘</span>’;” below located on the “content-product.php” file, I hope
   this is of help to anyone looking to make this customization:
 * <li <?php wc_product_class( ”, $product ); ?>>
    <?php /** * Hook: woocommerce_before_shop_loop_item.**
   [@hooked](https://wordpress.org/support/users/hooked/) woocommerce_template_loop_product_link_open–
   10 */ do_action( ‘woocommerce_before_shop_loop_item’ );
 *  /**
    * Hook: woocommerce_before_shop_loop_item_title. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_show_product_loop_sale_flash – 10 * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_product_thumbnail – 10 */ do_action( ‘woocommerce_before_shop_loop_item_title’);
 *  /**
    * Hook: woocommerce_shop_loop_item_title. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_product_title – 10 */ do_action( ‘woocommerce_shop_loop_item_title’);
 *  echo ‘<span style=”color:#ffffff”;>Style#: ‘. $product->get_sku() . ‘</span>’;
 *  /**
    * Hook: woocommerce_after_shop_loop_item_title. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_rating – 5 * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_price – 10 */ do_action( ‘woocommerce_after_shop_loop_item_title’);
 *  /**
    * Hook: woocommerce_after_shop_loop_item. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_product_link_close – 5 * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_add_to_cart – 10 */ do_action( ‘woocommerce_after_shop_loop_item’);?
   >
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] hiding prices for non-logged in users](https://wordpress.org/support/topic/hiding-prices-for-non-logged-in-users/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/hiding-prices-for-non-logged-in-users/#post-10943573)
 * in other words, the “log in for pricing” link has now disappeared from all of
   my products…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] disable “add to cart” based on user role](https://wordpress.org/support/topic/disable-add-to-cart-based-on-user-role-2/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/disable-add-to-cart-based-on-user-role-2/#post-8444228)
 * thanks Con! however I already have this functionality hard-coded and implemented
   onto my child theme see below:
 * // * BEGIN Hide prices
 *  add_action(‘after_setup_theme’,’activate_filter’) ;
    function activate_filter(){
   add_filter(‘woocommerce_get_price_html’, ‘show_price_logged’); } function show_price_logged(
   $price){ if(is_user_logged_in() ){ return $price; } else {
 *  remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);
   
   remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’,
   10 ); remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’,
   30 ); return ‘[Login for Pricing](https://wordpress.org/support/users/dfcdev/replies/&apos; . get_permalink(woocommerce_get_page_id(&apos;myaccount&apos;)) . &apos;?output_format=md)‘;
   remove_action( ‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_loop_price’,
   10 );
 *  }
    } // * END Hide prices
 * I basically just need to hide all add to cart functionality to certain users 
   can someone else take a stab at this and help me hard code this?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [disable “add to cart” based on user role](https://wordpress.org/support/topic/disable-add-to-cart-based-on-user-role/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/disable-add-to-cart-based-on-user-role/#post-8439977)
 * got it will do and thanks for your reply
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adjust the quantity input values to certain products NOT all products](https://wordpress.org/support/topic/adjust-the-quantity-input-values-to-certain-products-not-all-products/)
 *  Thread Starter [dfcdev](https://wordpress.org/support/users/dfcdev/)
 * (@dfcdev)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/adjust-the-quantity-input-values-to-certain-products-not-all-products/#post-7487328)
 * ok great! thanks will do just that! i hope i can get an answer!

Viewing 9 replies - 1 through 9 (of 9 total)