• Resolved brenrem

    (@brenrem)


    I’m hoping someone can help. I bought Boutique from Elegant Themes a couple years ago and am now finally using it. Since I am no longer an
    Elegant Theme member I cannot get help on their forum.

    I want the add to cart button and text removed from the template. I figured out how to remove the button by using {display:none;}, but for the life of me I cannot find where the floating text is so that I can remove it.

    I have bought a shopping cart to use, but when I get the page set up I have the templates add to cart button (which then doesn’t work) and the new shopping cart add to cart button. I don’t need two add to cart buttons on each page. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • If you’re working with a theme that is two years old, hasn’t been updated and you can no longer get support, I’d try using a different theme. There could be issues coming up with conflicts with new WP version or plugins…

    Before you put too much time into developing, consider switching.

    Thread Starter brenrem

    (@brenrem)

    Every function I need works great. I just don’t know which code I need to delete or change to get rid of the text I don’t want. There is no issues with anything other than me not being adept at reading code and knowing what to do, hence the reason I’m here. ??

    What is URL for your website where you have upload this theme? Because, we have no idea about theme version and how page looks. Please, let us know.
    Thanks

    Thread Starter brenrem

    (@brenrem)

    Sorry, the temporary page where it is at is:

    https://www.coversbydesign.net/crafts/wordpress/?p=211

    Like I said, the add to cart text is the only thing I am having trouble getting rid of.

    Thanks so much.

    Okay, I think I got it. You just want to display product and remove “add to cart” for your store-front pages.

    Note: I got hosting on cPanel, and assuming you have it too.

    I assume that you have appropriate login credentials for your website. All you need to launch your FTP (like filezilla, cyberduck depending on your system).

    1. Open any text-editor, create a file name add-to-cart.php and put following code inside that file and save on your desktop
      `
      <?php
      /**
      * Loop Add to Cart
      *
      * @author WooThemes
      * @package WooCommerce/Templates
      * @version 1.6.4
      */

      if ( ! defined( ‘ABSPATH’ ) ) exit; // Exit if accessed directly

      global $product;
      `
      Don’t do anything else

    2. Login to your server using FTP credentials. You will end up with root directory ie /public_html/
    3. Go to your theme folder which is Boutique. ie /public_html/wp-content/themes/boutique
    4. Create a folder name woocommerce in your theme directory (What it does? It hold custom template for woocommerce)
    5. Within woocommerce folder, create two new folders loop and single-product
    6. In single-product directory, and create add-to-cart
    7. In add-to-cart folder, create 5 empty files, which are named as
    • external.php
    • variable.php
    • grouped.php
    • simple.php
    • quantity.php
    • Remember: In linux, file system are case-sensitive. So, do not capitalize any file.
    • Go back to your woocommerce folder. This time create a file add-to-cart.php inside loop folder. Upload add-to-cart.php file inside it.

    copying code again, use this code:

    <?php
    /**
    * Loop Add to Cart
    *
    * @author WooThemes
    * @package WooCommerce/Templates
    * @version 1.6.4
    */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $product;

    Thread Starter brenrem

    (@brenrem)

    Thank you very much for this. I will try this after work.

    Thread Starter brenrem

    (@brenrem)

    How do I remove the “add to cart” text? I did what you said, but the text is still there and I don’t know where in the CSS to remove it.

    The code above will remove Add-to-cart from every single page.
    You want to go CSS way. Then, put following line of code at the end of your style.css ie stylesheet file.

    a.single-addtocart {
    	display: none !important;
    }

    Thread Starter brenrem

    (@brenrem)

    That worked. Thank you so very much.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove add to cart text from template’ is closed to new replies.