2

We were testing out a theme builder and have an issue with Civi not only replacing the page content in the body of the page but also in other areas (sidebar, footer). Did a little reading and know that Civi replaces page content, can you help me understand how that happens? I'd like to figure out if I can in fact make a minor tweak or two to the template or if I need to just scratch it altogether.

WordPress 4.4.5, CiviCRM 4.6.4

TLDR; We were testing out a theme and learned that Civi replaces page content and with the current setup, it's replacing other areas too (sidebar, footer).

1 Answer 1

1

The CiviCRM plugin only filters the content when the shortcode is present or when the page is the CiviCRM basepage. For shortcodes, it pre-renders the CiviCRM content that the shortcode represents at the wp action stage (in order to support multiple shortcodes in, for example, archive pages) and then uses the the_content filter to inject the CiviCRM content.

All the relevant code can be found in https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.shortcodes.php

If you have details of situations where the plugin incorrectly filters content, it would be helpful if you could update your question with specific information so that it can be addressed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.