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)

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

    norborov
    Participant

    Hello! 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 '';
    
    #634916

    Artem Temos
    Keymaster

    Hello,

    This hook is already there but doesn’t work for the search page. We will fix this in our next theme update.

    Kind Regards

    #634937

    norborov
    Participant

    When will this feature be available?

    #634997

    Artem Temos
    Keymaster

    This issue will be fixed in our next theme update that will be released later this month.

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