Home › Forums › WoodMart support forum › Missing woocommerce_page_title filter in template-tags.php (woodmart)
Missing woocommerce_page_title filter in template-tags.php (woodmart)
- This topic has 3 replies, 2 voices, and was last updated 3 months, 2 weeks ago by
Artem Temos.
-
AuthorPosts
-
February 3, 2025 at 9:04 am #634827
norborovParticipantHello! In your file
wp-content\themes\woodmart\inc\template-tags\template-tags.php on line 1343
, when displaying search results, the mandatory WooCommerce filter is missing to customize the title$page_title = apply_filters( 'woocommerce_page_title', $page_title )
, which does not allow the title to be overridden.Simply add one line of code on line 1343 of wp-content\themes\woodmart\inc\template-tags\template-tags.php so that it looks like this:
$title = esc_html__( 'Search Results for: ', 'woodmart' ) . get_search_query(); $title = apply_filters( 'woocommerce_page_title', $title ); Please do this urgently via a patch, it is very necessary.
In this part of the code
if ( is_search() ) { $title = esc_html__( 'Search Results for: ', 'woodmart' ) . get_search_query(); } ?> <div class="wd-page-title page-title <?php echo esc_attr( $title_class ); ?> title-blog" style="<?php echo esc_attr( $style ); ?>"> <div class="container"> <?php if ( $page_title && is_single() ) : ?> <h3 class="entry-title title"><?php echo wp_kses( $title, woodmart_get_allowed_html() ); ?></h3> <?php elseif ( $page_title ) : ?> <<?php echo esc_attr( $title_tag ); ?> class="entry-title title"><?php echo wp_kses( $title, woodmart_get_allowed_html() ); ?></<?php echo esc_attr( $title_tag ); ?>> <?php endif; ?> <?php do_action( 'woodmart_page_title_after_title' ); ?> <?php if ( $breadcrumbs && ! is_search() ) : ?> <?php woodmart_current_breadcrumbs( 'pages' ); ?> <?php endif; ?> </div> </div> <?php return '';
February 3, 2025 at 12:26 pm #634916
Artem TemosKeymasterHello,
This hook is already there but doesn’t work for the search page. We will fix this in our next theme update.
Kind Regards
February 3, 2025 at 1:04 pm #634937
norborovParticipantWhen will this feature be available?
February 3, 2025 at 2:34 pm #634997
Artem TemosKeymasterThis issue will be fixed in our next theme update that will be released later this month.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register