Answers.Body: <p>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 <code>wp</code> action stage (in order to support multiple shortcodes in, for example, archive pages) and then uses the <code>the_content</code> filter to inject the CiviCRM content. </p>
  
  <p>All the relevant code can be found in <a href="https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.shortcodes.php" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.shortcodes.php</a></p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T19:46:55.307Z
Answers.LastActivityDate: 2016-12-21T19:46:55.307Z
Answers.UserDisplayName: Christian Wach
Body: <p>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. </p>
  
  <p>WordPress 4.4.5, CiviCRM 4.6.4</p>
  
  <p>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).</p>
  
Tags: <wordpress>
Title: How does civi replace page content? Wordpress
ThreadText: # How does civi replace page content? Wordpress
  
  (Asked by: username_0 on 2016-12-21)
  
  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).
  
  **Tags:** wordpress
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-21. Score: 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.
  
  
  ---
  
  