Home Forums WoodMart support forum Can I adjust html structure in WooCommerce Shop page / product category page?

Can I adjust html structure in WooCommerce Shop page / product category page?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #228303

    mostandq
    Participant

    URL:https://www.techandq.com/product/
    Currently the html tag of product title in product list page(WooCommerce
    Shop page) is h3(please check the attachment, the url is the above one). Is it possible to to do some adjustments in child theme to use h2 instead of h3 for the product title in WooCommerce
    Shop page? If yes, could you please tell me how to do this adjustment?

    I also want to the adjustment for product category(including sub category), url:
    https://www.techandq.com/product-category/guest-chair/
    https://www.techandq.com/product-category/guest-chair/armchair/

    Attachments:
    You must be logged in to view attached files.
    #228468

    Hello,

    Please take this file woodmart/woocommerce/loop/title.phpcopy to the child theme and edit.

    Best Regards

    #228608

    mostandq
    Participant

    Hi,
    I edit this file first:
    /wp-content/themes/woodmart/woocommerce/loop/title.php
    Please check the attachment, it seems doesn’t work after clearing all cache files, could you check it for me.

    I also want to know how to add it to child theme. Can you tell me the correct path under child theme? Should I add it to the root folder of child theme or /woodmart-child/woocommerce/loop/, or others.

    I currently use child theme

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #228645

    Artem Temos
    Keymaster

    Please, disable all external plugins and send us your admin and FTP access so we can check how it works. Yes, you can copy it to the folder /woodmart-child/woocommerce/loop/ and edit from there.

    #228655

    mostandq
    Participant

    Please check Private Content. I already disable plugin that won’t affect functions or templates. I am running Google AD now, can not disable all plugins.

    #228658

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    	function woocommerce_template_loop_product_title() {
    		echo '<h2 class="product-title"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h2>';
    	}
    #228684

    mostandq
    Participant

    Hi, it do work, thanks.
    Should I keep the previous code in loop.php?
    By the way, when I try to use code snippet to add this code, it show the error(plz check the attachment), and I can not add it.
    I add it in child theme function.php

    I also suggest you make this adjustment if possible in next version, since only H1 and H3 in current product list page, no H2.

    Attachments:
    You must be logged in to view attached files.
    #228687

    Artem Temos
    Keymaster

    Just keep the code in the child theme functions.php file. Also, keep the file from loop/ folder as well.

    #228690

    mostandq
    Participant

    Get it, thanks. This ticket can be close.

    #228704

    Artem Temos
    Keymaster

    You are welcome!

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Can I adjust html structure in WooCommerce Shop page / product category page?’ is closed to new replies.