Home Forums WoodMart support forum Sticky ATC Title to modify in

Sticky ATC Title to modify in

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

    ecom.france35
    Participant

    Hello,

    Title of sticky ATC on product pages is in H4 and I need to modify in <p> for my SEO.

    Could you give me a PHP code?

    Thanks

    #525049

    ecom.france35
    Participant

    See screenshot

    #525050

    ecom.france35
    Participant

    See screenshot here

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

    Hung Pham
    Keymaster

    Hi ecom.france35,

    Thanks for reaching to us.

    Please add below code to functions.php in Child theme

    if ( ! function_exists( 'woodmart_sticky_single_add_to_cart' ) ) {
    	function woodmart_sticky_single_add_to_cart() {
    		global $product;
    
    		if ( ! woodmart_woocommerce_installed() || ! is_product() || ! woodmart_get_opt( 'single_sticky_add_to_cart' ) ) {
    			return;
    		}
    
    		woodmart_enqueue_js_script( 'sticky-add-to-cart' );
    		woodmart_enqueue_inline_style( 'sticky-add-to-cart' );
    
    		if ( woodmart_get_opt( 'mobile_single_sticky_add_to_cart' ) ) {
    			woodmart_enqueue_inline_style( 'woo-mod-quantity-overlap' );
    		}
    
    		?>
    			<div class="wd-sticky-btn<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn' ); ?>">
    				<div class="wd-sticky-btn-container container<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-container' ); ?>">
    					<div class="wd-sticky-btn-content<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-content' ); ?>">
    						<div class="wd-sticky-btn-thumbnail<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-thumbnail' ); ?>">
    							<?php echo woocommerce_get_product_thumbnail(); ?>
    						</div>
    						<div class="wd-sticky-btn-info<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-info' ); ?>">
    							<p class="wd-entities-title"><?php the_title(); ?></p>
    							<?php echo wc_get_rating_html( $product->get_average_rating() ); ?>
    						</div>
    					</div>
    					<div class="wd-sticky-btn-cart<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-cart' ); ?>">
    						<span class="price"><?php echo wp_kses_post( $product->get_price_html() ); ?></span>
    						<?php if ( $product->is_type( 'simple' ) ) : ?>
    							<?php woocommerce_simple_add_to_cart(); ?>
    						<?php else : ?>
    							<a href="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="wd-sticky-add-to-cart button alt<?php echo woodmart_get_old_classes( ' woodmart-sticky-add-to-cart' ); ?>">
    								<?php echo true == $product->is_type( 'variable' ) ? esc_html__( 'Select options', 'woodmart' ) : $product->single_add_to_cart_text(); ?>
    							</a>
    							<?php Quick_Buy::get_instance()->output_quick_buy_button(); ?>
    						<?php endif; ?>
    
    						<?php do_action( 'woodmart_sticky_atc_actions' ); ?>
    					</div>
    
    				</div>
    			</div>
    		<?php
    	}
    	add_action( 'woodmart_before_wp_footer', 'woodmart_sticky_single_add_to_cart', 999 );
    }

    Regards,

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