Home Forums Space themes support forum How to change H tag

How to change H tag

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #631423

    foxsale55
    Participant

    Pls, need hlp. How to change tag H in block?
    I did not find these settings in the elementor settings.

    And how to change H tag in product listing?

    • This topic was modified 23 hours, 41 minutes ago by foxsale55.
    Attachments:
    You must be logged in to view attached files.
    #631610

    Luke Nielsen
    Keymaster

    Hello,

    1. To change the tag for title product tabs, you need to override the xts_product_tabs_template function in the child theme and change the h3 tag

    2. Title of products:

    function woocommerce_template_loop_product_title() {
    		?>
    		<span class="woocommerce-loop-product__title xts-entities-title">
    			<a href="<?php echo esc_url( get_the_permalink() ); ?>">
    				<?php echo get_the_title(); // phpcs:ignore ?>
    			</a>
    		</span>
    		<?php
    }

    3. For the product categories titles, also put the code to the child theme:

    function woocommerce_template_loop_category_title( $category ) {
    		?>
    			<span class="xts-entities-title woocommerce-loop-category__title">
    				<a href="<?php echo esc_url( get_term_link( $category, 'product_cat' ) ); ?>">
    					<?php echo esc_html( $category->name ); ?>
    				</a>
    			</span>
    
    			<?php if ( $category->count > 0 && xts_get_opt( 'categories_product_count' ) ) : ?>
    				<div class="xts-cat-count">
    					<span>
    						<?php echo esc_html( $category->count ); ?>
    					</span>
    
    					<span class="xts-cat-count-text">
    						<?php echo sprintf( _n( 'product', 'products', $category->count, 'xts-theme' ), $category->count ); // phpcs:ignore ?>
    					</span>
    				</div>
    			<?php endif; ?>
    		<?php
    }

    Kind Regards

    #631701

    foxsale55
    Participant

    Can you tell me where this file is stored that needs to be modified? I can’t find it.

    #631715

    foxsale55
    Participant

    I was able to figure it out, you helped me a lot, it turns out it’s easy to work with, i just had to insert the plugin names in the text search in the site’s file manager, this allowed you to find the right file and the right code in the file, and then make changes. Everything works like clockwork.

    Big tnks! Close topic.

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