-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
bugThis fixes or addresses a bugThis fixes or addresses a bugenhancementThis is an enhancement or new featureThis is an enhancement or new feature
Description
The Avada theme has a bug in their Layout Builder where the_content is generated for the header, body, and footer. This causes duplicate content on our listing details pages.
This should fix the issue. We should find a way to add this to our plugin so users don't have to add it themselves.
- Go to the Appearance->Theme File Editor page in your WordPress dashboard
- Make sure Select theme to edit is Avada Child
- In the
functions.phpfile, paste the following code (below any existing code is fine):
add_action('awb_remove_third_party_the_content_changes', 'sr_avada_remove_filters', 10);
function sr_avada_remove_filters() {
if (class_exists('SimplyRetsCustomPostPages' )) {
remove_filter('the_content', array('SimplyRetsCustomPostPages', 'srPostDefaultContent'));
}
}
add_action('awb_readd_third_party_the_content_changes', 'sr_avada_readd_filters', 20);
function sr_avada_readd_filters() {
if (class_exists( 'SimplyRetsCustomPostPages' )) {
add_filter('the_content', array('SimplyRetsCustomPostPages', 'srPostDefaultContent'));
}
}
Metadata
Metadata
Assignees
Labels
bugThis fixes or addresses a bugThis fixes or addresses a bugenhancementThis is an enhancement or new featureThis is an enhancement or new feature