Home Forums WoodMart support forum Changing the default "H" value for the title section

Changing the default "H" value for the title section

Viewing 30 posts - 31 through 60 (of 66 total)
  • Author
    Posts
  • #33565

    Artem Temos
    Keymaster

    You can change this tag to H4 for your products in the place we mentioned earlier. Or even change it to P.

    #33748

    lavitasarim
    Participant

    Thank you.

    “Shopping cart” turns out to be h3 in analysis. How will this happen?

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

    Artem Temos
    Keymaster

    Hi,

    You can change this title in the file header.php.

    Regards

    #33798

    lavitasarim
    Participant

    The other issue is still unresolved.

    “woocommerce/loop/title.php”
    When I moved this file to “CHILD” theme in the same way, the h3 tag did not change.
    “woodmart-child/woocommerce/loop/”

    File content:

    <?php
    /**
    * Product loop title
    *
    * @author WooThemes
    * @package WooCommerce/Templates
    * @version 2.4.0
    */
    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly
    }
    ?>
    <h3 class=”product-title”>“><?php the_title(); ?></h3>

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

    Artem Temos
    Keymaster

    But as we can see from your file content you didn’t change this H3 tag in that file.

    #33885

    lavitasarim
    Participant

    The main page did not change even though I changed the contents.

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

    Artem Temos
    Keymaster

    Please, provide us your FTP access so we can check it.

    #34393

    lavitasarim
    Participant

    I do what you say. Maybe I need to change it from somewhere else?

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

    lavitasarim
    Participant

    I have also edited the same file from the main theme but the result has not changed.

    #34415

    Artem Temos
    Keymaster

    Sorry, seems to be a wrong place. Try to add the following code snippet to the functions.php file in the child theme to change it

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

    lavitasarim
    Participant

    Hi.

    When I was struggling, I made the change by changing the section “Custom function for product title” in the file “inc -> woocommerce.php”. The result is positive. In this main theme.

    I did this by copying it to “CHILD” theme, but the result did not occur 🙁

    Why are the transactions made in the main theme not realized in CHİLD?

    Help me.

    Thanks.

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

    Artem Temos
    Keymaster

    As we said, you just need to paste the code we sent you to the functions.php file. You don’t need to copy the whole file.

    #34474

    lavitasarim
    Participant

    Okay, I will do what you say and let you know. But as I said, I do not want to ask you all the time. Therefore, I would be glad if you answer my last question?

    #34526

    Artem Temos
    Keymaster

    In the child theme, you can override only basic WordPress template files like header.php, index.php, footer.php and other. You can’t simply copy other PHP functions files and edit them.

    #34651

    lavitasarim
    Participant

    OK. So will you not tell me what I have to do then?

    #34673

    Artem Temos
    Keymaster

    Sorry, what exactly do you want to do? Change the product’s title tag? But we already sent you a solution to this.

    #34690

    lavitasarim
    Participant

    That process has been completed. Thank you.

    That’s what I’m talking about. What should I do in order to edit the files in the subdirectories like “inc -> woocommerce.php”?

    For example, if I place the codes I find in the “function.php” file, the problem is solved? How should I place it?

    Thanks.

    #34706

    Artem Temos
    Keymaster

    You can simply copy certain functions from our theme files and paste them all to the functions.php file in the child theme to edit them. Here is a more details instruction for this https://code.tutsplus.com/articles/understanding-wordpress-pluggable-functions-and-their-usage–wp-30189

    #34736

    lavitasarim
    Participant

    I have not been able to find out where to change the H label of the title of the comments section on the product page (İncelemeler).

    Could you help?

    Thanks.

    #34753

    Artem Temos
    Keymaster

    It comes with WooCommerce plugin and is located in wp-content\plugins\woocommerce\templates\single-product-reviews.php file.

    #34862

    lavitasarim
    Participant

    Hello there. I changed the H label, thank you. But I could not make the font type thick.

    ?>
    <div id=”reviews” class=”woocommerce-Reviews”>
    <div id=”comments”>
    <p class=”woocommerce-Reviews-title”><?php
    if ( get_option( ‘woocommerce_enable_review_rating’ ) === ‘yes’ && ( $count = $product->get_review_count() ) ) {
    /* translators: 1: reviews count 2: product name */
    printf( esc_html( _n( ‘%1$s review for %2$s’, ‘%1$s reviews for %2$s’, $count, ‘woocommerce’ ) ), esc_html( $count ), ‘<span>’ . get_the_title() . ‘</span>’ );
    } else {
    _e( ‘Reviews’, ‘woocommerce’ );
    }
    ?></p>

    #34878

    ducphuli
    Participant

    Hy vọng Woodmart sẽ quan tâm nhiều hơn đến các thẻ SEO trong bản cập nhật.

    #34912

    Artem Temos
    Keymaster

    Try to add the following code snippet to the Custom CSS area in Theme Settings to change the font weight and color

    .woocommerce-Reviews .woocommerce-Reviews-title {
    	font-weight: bold;
    	color: #000;
    }
    #34958

    lavitasarim
    Participant

    Thanks.

    I have found out where to replace the related products H label.

    I have not found how to add it to the Function.php file. The codes in the Appendix.

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

    Artem Temos
    Keymaster

    This file can be simply overridden in the child theme. Just copy it to the appropriate location and edit.

    #34964

    lavitasarim
    Participant

    Where is the appropriate place? How do I place it?

    Could you help?

    Thanks.

    #34972

    Artem Temos
    Keymaster

    It should be in the same location as in the parent theme. So it should be woodmart-child/woocommerce/single-product/related.php.

    #35031

    lavitasarim
    Participant

    Hello there. Where can I change the “sidebar” and general “footer” H tags on the store page?

    Thanks.

    #35032

    lavitasarim
    Participant

    Hello there. Where can I change the “sidebar” and general “footer” H tags on the store page?

    Thanks.

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

    Artem Temos
    Keymaster

    Copy this code to the function.php in the child theme and edit

    	function woodmart_widget_init() {
    		if( function_exists( 'register_sidebar' ) ) {
    			$widget_class = ( woodmart_get_opt( 'widget_toggle' ) ) ? ' widget-hidable' : '';
    
    			if( woodmart_get_opt( 'full_screen_menu' ) ) {
    				register_sidebar(
    					array(
    						'name'          => esc_html__( 'Full Screen Menu Area', 'woodmart' ),
    						'id'            => 'sidebar-full-screen-menu',
    						'description'   => esc_html__( 'Widget Area for full screen menu', 'woodmart' ),
    						'class'         => '',
    						'before_widget' => '<div id="%1$s" class="woodmart-widget full-screen-menu-widget' . $widget_class . ' %2$s">',
    						'after_widget'  => '</div>',
    						'before_title'  => '<h5 class="widget-title">',
    						'after_title'   => '</h5>'
    					)
    				);
    			}
    
    			register_sidebar( 
    				array(
    					'name'          => esc_html__( 'Main Widget Area', 'woodmart' ),
    					'id'            => 'sidebar-1',
    					'description'   => esc_html__( 'Default Widget Area for posts and pages', 'woodmart' ),
    					'class'         => '',
    					'before_widget' => '<div id="%1$s" class="woodmart-widget sidebar-widget' . $widget_class . ' %2$s">',
    					'after_widget'  => '</div>',
    					'before_title'  => '<h5 class="widget-title">',
    					'after_title'   => '</h5>'
    				)
    			);
    			if( woodmart_woocommerce_installed() ) {
    
    				$filter_widget_class = woodmart_get_widget_column_class( 'filters-area' );
    
    				register_sidebar( 
    					array(
    						'name'          => esc_html__( 'Shop page Widget Area', 'woodmart' ),
    						'id'            => 'sidebar-shop',
    						'description'   => esc_html__( 'Widget Area for shop pages', 'woodmart' ),
    						'class'         => '',
    						'before_widget' => '<div id="%1$s" class="woodmart-widget sidebar-widget' . $widget_class . ' %2$s">',
    						'after_widget'  => '</div>',
    						'before_title'  => '<h5 class="widget-title">',
    						'after_title'   => '</h5>'
    					)
    				);
    				register_sidebar( 
    					array(
    						'name'          => esc_html__( 'Shop filters', 'woodmart' ),
    						'id'            => 'filters-area',
    						'description'   => esc_html__( 'Widget Area for shop filters above the products', 'woodmart' ),
    						'class'         => '',
    						'before_widget' => '<div id="%1$s" class="woodmart-widget filter-widget' . $widget_class . ' ' . esc_attr( $filter_widget_class ) . ' %2$s">',
    						'after_widget'  => '</div>',
    						'before_title'  => '<h5 class="widget-title">',
    						'after_title'   => '</h5>'
    					)
    				);
    				register_sidebar( 
    					array(
    						'name'          => esc_html__( 'Single product page Widget Area', 'woodmart' ),
    						'id'            => 'sidebar-product-single',
    						'description'   => esc_html__( 'Widget Area for single product page', 'woodmart' ),
    						'class'         => '',
    						'before_widget' => '<div id="%1$s" class="woodmart-widget sidebar-widget' . $widget_class . ' %2$s">',
    						'after_widget'  => '</div>',
    						'before_title'  => '<h5 class="widget-title">',
    						'after_title'   => '</h5>'
    					)
    				);
    				
    				register_sidebar( 
    					array(
    						'name'          => esc_html__( 'My Account pages sidebar', 'woodmart' ),
    						'id'            => 'sidebar-my-account',
    						'description'   => esc_html__( 'Widget Area for My Account, orders and other user pages.', 'woodmart' ),
    						'class'         => '',
    						'before_widget' => '<div id="%1$s" class="woodmart-widget sidebar-widget' . $widget_class . ' widget-my-account %2$s">',
    						'after_widget'  => '</div>',
    						'before_title'  => '<h5 class="widget-title">',
    						'after_title'   => '</h5>'
    					)
    				);
    			}
    
    			register_sidebar( 
    				array(
    					'name'          => esc_html__( 'Widget Area in the header', 'woodmart' ),
    					'id'            => 'header-widgets',
    					'description'   => esc_html__( 'Widget Area for some header types. Will be displayed if "Text in the header" field is empty in Theme Options', 'woodmart' ),
    					'class'         => '',
    					'before_widget' => '<div id="%1$s" class="woodmart-widget header-widget %2$s">',
    					'after_widget'  => '</div>',
    					'before_title'  => '<h5 class="widget-title">',
    					'after_title'   => '</h5>'
    				)
    			);
    
    			register_sidebar( 
    				array(
    					'name'          => esc_html__( 'Area after the mobile menu', 'woodmart' ),
    					'id'            => 'mobile-menu-widgets',
    					'description'   => esc_html__( 'Place your widgets that will be displayed after the mobile menu links', 'woodmart' ),
    					'class'         => '',
    					'before_widget' => '<div id="%1$s" class="woodmart-widget mobile-menu-widget %2$s">',
    					'after_widget'  => '</div>',
    					'before_title'  => '<h5 class="widget-title">',
    					'after_title'   => '</h5>'
    				)
    			);
    
    			$footer_layout = woodmart_get_opt( 'footer-layout' );
    
    			$footer_config = woodmart_get_footer_config( $footer_layout );
    
    			if( count( $footer_config['cols'] ) > 0 ) {
    				foreach ( $footer_config['cols'] as $key => $columns ) {
    					$index = $key + 1;
    					register_sidebar( 
    						array(
    							'name'          => 'Footer Column ' . $index,
    							'id'            => 'footer-'.$index,
    							'description'   => 'Footer column',
    							'class'         => '',
    							'before_widget' => '<div id="%1$s" class="woodmart-widget footer-widget %2$s">',
    							'after_widget'  => '</div>',
    							'before_title'  => '<h5 class="widget-title">',
    							'after_title'   => '</h5>'
    						)
    					);
    				}
    			}
    
    			$custom_sidebars = get_posts( array('post_type' => 'woodmart_sidebar', 'post_status'=>'publish') );
    			
    			foreach ( $custom_sidebars as $sidebar ) {
    				register_sidebar( 
    					array(
    						'name'          => $sidebar->post_title,
    						'id'            => 'sidebar-' . $sidebar->ID,
    						'description'   => '',
    						'class'         => '',
    						'before_widget' => '<div id="%1$s" class="woodmart-widget sidebar-widget %2$s">',
    						'after_widget'  => '</div>',
    						'before_title'  => '<h5 class="widget-title">',
    						'after_title'   => '</h5>'
    					)
    				);
    			}
    		}
    	}
    
    	add_action( 'widgets_init', 'woodmart_widget_init' );

Tagged: , , ,

Viewing 30 posts - 31 through 60 (of 66 total)