Home › Forums › WoodMart support forum › Changing the default "H" value for the title section
Changing the default "H" value for the title section
- This topic has 65 replies, 3 voices, and was last updated 6 years, 11 months ago by Artem Temos.
-
AuthorPosts
-
January 15, 2018 at 3:01 pm #33565
Artem TemosKeymasterYou can change this tag to H4 for your products in the place we mentioned earlier. Or even change it to P.
January 17, 2018 at 5:58 am #33748
lavitasarimParticipantThank you.
“Shopping cart” turns out to be h3 in analysis. How will this happen?
Attachments:
You must be logged in to view attached files.January 17, 2018 at 7:18 am #33760
Artem TemosKeymasterHi,
You can change this title in the file
header.php
.Regards
January 17, 2018 at 11:29 am #33798
lavitasarimParticipantThe 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.January 17, 2018 at 1:34 pm #33813
Artem TemosKeymasterBut as we can see from your file content you didn’t change this H3 tag in that file.
January 17, 2018 at 7:29 pm #33885
lavitasarimParticipantThe main page did not change even though I changed the contents.
Attachments:
You must be logged in to view attached files.January 17, 2018 at 8:40 pm #33902
Artem TemosKeymasterPlease, provide us your FTP access so we can check it.
January 20, 2018 at 5:29 am #34393
lavitasarimParticipantI do what you say. Maybe I need to change it from somewhere else?
Attachments:
You must be logged in to view attached files.January 20, 2018 at 5:41 am #34396
lavitasarimParticipantI have also edited the same file from the main theme but the result has not changed.
January 20, 2018 at 9:15 am #34415
Artem TemosKeymasterSorry, 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>'; }
January 20, 2018 at 11:03 am #34433
lavitasarimParticipantHi.
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.January 20, 2018 at 3:04 pm #34448
Artem TemosKeymasterAs 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.
January 20, 2018 at 5:41 pm #34474
lavitasarimParticipantOkay, 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?
January 21, 2018 at 9:50 am #34526
Artem TemosKeymasterIn 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.
January 22, 2018 at 4:49 am #34651
lavitasarimParticipantOK. So will you not tell me what I have to do then?
January 22, 2018 at 7:41 am #34673
Artem TemosKeymasterSorry, what exactly do you want to do? Change the product’s title tag? But we already sent you a solution to this.
January 22, 2018 at 9:34 am #34690
lavitasarimParticipantThat 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.
January 22, 2018 at 10:31 am #34706
Artem TemosKeymasterYou 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
January 22, 2018 at 12:15 pm #34736
lavitasarimParticipantI 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.
January 22, 2018 at 1:04 pm #34753
Artem TemosKeymasterIt comes with WooCommerce plugin and is located in
wp-content\plugins\woocommerce\templates\single-product-reviews.php
file.January 23, 2018 at 6:27 am #34862
lavitasarimParticipantHello 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>January 23, 2018 at 7:51 am #34878
ducphuliParticipantHy vọng Woodmart sẽ quan tâm nhiều hơn đến các thẻ SEO trong bản cập nhật.
January 23, 2018 at 8:36 am #34912
Artem TemosKeymasterTry 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; }
January 23, 2018 at 10:49 am #34958
lavitasarimParticipantThanks.
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.January 23, 2018 at 10:55 am #34961
Artem TemosKeymasterThis file can be simply overridden in the child theme. Just copy it to the appropriate location and edit.
January 23, 2018 at 11:21 am #34964
lavitasarimParticipantWhere is the appropriate place? How do I place it?
Could you help?
Thanks.
January 23, 2018 at 12:19 pm #34972
Artem TemosKeymasterIt should be in the same location as in the parent theme. So it should be
woodmart-child/woocommerce/single-product/related.php
.January 23, 2018 at 3:43 pm #35031
lavitasarimParticipantHello there. Where can I change the “sidebar” and general “footer” H tags on the store page?
Thanks.
January 23, 2018 at 3:46 pm #35032
lavitasarimParticipantHello 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.January 23, 2018 at 3:59 pm #35038
Artem TemosKeymasterCopy 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' );
-
AuthorPosts
- You must be logged in to create new topics. Login / Register