I’m using WooCommerce on Genesis with Dynamik Website Builder, and using your plugin to link everything up.
When I used the standard WooCommerce filter, ‘woocommerce_page_title’, the page titles in the shop do not change.
This is because in the template-builder.php file for the Genesis Connect for WooCommerce plugin, the page title is hard coded, without using this filter, leaving me with no way to change the titles.
As a short-term measure, I have modified the plugin file, which I hate
doing, but if you can tell me another way, I’ve love to hear about it.
The changes I made are as follows:
Replaced line 251 of this file with:
<?php $page_title = single_term_title( "", false ); echo apply_filters( 'woocommerce_page_title', $page_title ); ?>
Replaced line 256 of this file with:
$page_title = apply_filters( 'the_title', ( $shop_page_title = get_option('woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title, $shop_page->ID ); echo apply_filters( 'woocommerce_page_title', $page_title );
This the allows me to customise the page title using custom PHP in my
theme’s functions.php file, via the ‘woocommerce_page_title’ filter.
I’d love it if you could apply a solution for this with a subsequent
version of the plugin, so I don’t have to modify core plugin files to make this work as expected.
- The topic ‘Please add in page title filters to allow shop page titles to be changed’ is closed to new replies.