Jump to content
King Creative Design

Woocommerce description loop

Recommended Posts

King Creative Design

I am setting up a Woocommerce site using PL Framework and Platform 5. I added a hook so the category description appears under the category page titles (on archive pages). However, it also appears under the title on the main "shop" page (which I have renamed "Catelog" page). There is a default description here and I can't figure out for the life of me where it is being generated from so I can change it. Any ideas how to change it or delete it on the main shop page ONLY? The staging site is here - http://16e.117.myftpupload.com/ and the page in question is http://16e.117.myftpupload.com/catalog/

I have hit up Woocommerce support and they weren't familiar with Platform 5 and recommended I contact you.

Your help would be appreciated, thanks!

Michele

Screen Shot 2018-01-11 at 10.22.12 PM.png

Share this post


Link to post
Share on other sites
edgarcheverier

Hi,

Do you want it to look like this? : https://cl.ly/3d1h0x1j1o17

You can apply this code in to your LESS/CSS editor: 
.woocommerce-loop-category__title{
    display: none;
}

Share this post


Link to post
Share on other sites
King Creative Design

Hi Edgar, thanks for looking at this.

Unfortunately, when I add the css you gave me it doesn't work. (P.S. I fixed the double underscore that you have between category and title and still doesn't work).

I'm not trying to remove the 'title', but I am trying to remove the 'description'. The below css works however, it removes it from of ALL the category pages and I'm looking to ONLY take it off the main store page.

.woocommerce-category-description {
  display: none;
}

I think the best thing for me here would be to find out where this comment/description "This is where you can add new products to your store." comes from so I can reword it.

Any ideas?

Share this post


Link to post
Share on other sites
King Creative Design

By the way, this outlines what I did to get the description to show under the title, by modifying the archive-product.php file in the child theme -- 

This is the new code I added:

//show category description
$term_object = get_queried_object();
?>
<div class="woocommerce-category-description">
    <div class="title"><?php echo $term_object->name; ?></div>
    <div class="description"><?php echo $term_object->description; ?></div>
</div>
                <?php

 

this is the code which already existed. I put the new code right above this:

        <?php
            /**
             * woocommerce_archive_description hook.
             *
             * @hooked woocommerce_taxonomy_archive_description - 10
             * @hooked woocommerce_product_archive_description - 10
             */
            do_action( 'woocommerce_archive_description' );
        ?>

    </header>

 

Share this post


Link to post
Share on other sites
edgarcheverier

Hi Michael,

Ha ok, so you want to change the description  'This is where you can add new products to your store'.

Yes, the problem is that they have the same CSS class in all the pages, so if you apply display none, is going the disappear in all the pages.

How did you apply the content in the description?

 

 

 

 

 

Share this post


Link to post
Share on other sites
King Creative Design

I apply the category description in the Woocommerce product category section. When you set up a new category there is a place to add a description. Obviously, the shop page is not a category so it does not apply in this scenario.

Share this post


Link to post
Share on other sites
King Creative Design

Unfortunately, your idea didn't work because it's a dynamic page and the template can not be modified that way.

However... I was able to do a workaround. I created a stand-alone static page and put the category photos in manually (not dynamically).

Then, in the functions.php (in the child theme) I put the following code which assigns a custom url from the empty cart page.

 

/**
 * Changes the redirect URL for the Return To Shop button in the cart.
 *
 * @return string
 */
function wc_empty_cart_redirect_url() {
return '/design-africa-catalog/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );

  • Like 1

Share this post


Link to post
Share on other sites
edgarcheverier

That's great!

I glad then you found the solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • Jessica McCabe Lawson
      By Jessica McCabe Lawson+
      I'm building a product catalog site. The featured image is set correctly, but the woocommerce placeholder image is displaying instead. If I click on the placeholder image, the featured image appears, and the featured image works fine as a thumbnail.
      Please view the site here: http://www.directmat.net/product/power-lock-logo-mat/
      Note: I deleted the placeholder image via FTP to see if that would inspire Quick Shop to look for the featured image. No such luck. Please help!
    • mtaus
      By mtaus+
      I'm using Woocommerce in a Pagelines framework. When I build out a product, I'm able to add images in the admin panel and the
      Product Image will display on Shop page, but neither the Product Image nor the Product Gallery will display on the product's dedicated page.
      Shop: https://bendbotanics.com/shop/
      Product Example: https://bendbotanics.com/product/500mg-full-spectrum-hemp-oil-fsho/
      Any help would be greatly appreciated!
    • cdracos
      By cdracos+
      Hello everyone,
      I face a common problem as I can see on relevant topics with quickshop plugin. 
      On Product Single page of woocommerce, i use quickshop as layout. The primary photo of my product doesn't appear on the thumb slider, but the first image is the default placeholder. 
      Need some help not with custom script in the product description for each product. 
      Have a look on my website: http://lillyandsid.gr/shop/camp-things-top/
    • bnapoli
      By bnapoli+
      I have Quickshop installed on my WooCommerce section of this website: http://a04.125.myftpupload.com/
      Main Shop: http://a04.125.myftpupload.com/?page_id=1198
      I've having what appears to be CSS issues on the individual product pages. After cleaning up any code accessible from the wp-admin, the page still appears broken. I never tried to customize it, it just came broken like this right out of the box.
      You can see examples of it broken on every single product page, see here:
      http://a04.125.myftpupload.com/?product=futaba-14sg-14-channel-2-4-ghz-radio-system
      http://a04.125.myftpupload.com/?product=gremsy-gstabi-h7-brushless-3-axis-gimbal
      http://a04.125.myftpupload.com/?product=dji-inspire-1-zenmuse-x5-gimbal-and-camera-unit
      http://a04.125.myftpupload.com/?product=dji-wookong-m-flight-controller
      Can somebody help?
    • DonRicardoRVM
      By DonRicardoRVM+
      Hi
      First of all, sorry for my bad english.
      I have a shop with Woocommerce, platform-5 and PL Quicshop, and it´s all OK, but there is a prloblem: in the category page product I don´t get dosplay the bubble "price" when the product is in sale. 
      Example:
      This is my product category page, without the bubble: https://globosdemar.com/categoria-producto/collares/
      And this is othrer shop with the bubble: https://www.usaprocom.com/product-category/fireplace-systems/
      Somebody knows how solve this?
      Thanks
×