# How to add price comparison blocks to WooCommerce

**1. Configure Shortcodes in Content Egg Settings**

Go to **Content Egg > Settings > WooCommerce** and add the desired CE shortcodes for price comparison into the following fields:

* `Add Shortcode to Single Product Pages`
* `Add Shortcode to Archive Pages`

<figure><img src="/files/JgMNfFFydPqSAFt1A3oH" alt=""><figcaption></figcaption></figure>

After adding the shortcodes, the price comparison blocks will appear on:

* **Single Product Pages** (e.g., example view below):

<figure><img src="/files/Ps2oBPM7SYy7xSA0dZnT" alt=""><figcaption></figcaption></figure>

* **Archive Pages** (e.g., example view below):

<figure><img src="/files/znPfnj9nCDtEagjV88Nx" alt=""><figcaption></figcaption></figure>

**2. Remove the Default WooCommerce "Buy Now" Button and Price (Optional)**

If you want to remove the default WooCommerce "Buy Now" button or price display, here are your options:

1. **Using Theme Settings:** Many themes allow you to control page elements directly. Go to: **Appearance > Customize > WooCommerce > Single Products/Product Archives.**

   From here, you can hide or modify elements like the "Buy Now" button or price.

<figure><img src="/files/ELd5xs5L9zdl2MQOdL0p" alt=""><figcaption></figcaption></figure>

2. **Using Custom CSS:** A simple solution is to hide these elements with custom CSS. For example:

```css
.woocommerce div.product .single_add_to_cart_button {
    display: none;
}
.woocommerce div.product .price {
    display: none;
}
```

3. **Using Hooks:** In some cases, WooCommerce hooks can be used to remove specific elements.  Add the following code snippet to your theme's *functions.php*

```php
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
```

***

**Need Help?**

The exact steps to remove the button or price depend on the theme you're using. For detailed instructions, refer to your theme's documentation or contact your theme's support team for assistance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ce-docs.keywordrush.com/faq/how-to-add-price-comparison-blocks-to-woocommerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
