Answers.Body: <p>You could use JetPack or another widget visibility plugin to prevent showing the page in the footer when you're on the CiviCRM Base Page.</p>
  <p>EDIT: The following code prevents CiviCRM from overriding the content a second time:</p>
  <pre><code>add_action( 'civicrm_basepage_parsed', 'my_civicrm_disable_content_filter' );
  
  function my_civicrm_disable_content_filter() {
      // Once the CiviCRM filter has run, remove it.
      add_filter( 'the_content', 'my_civicrm_remove_content_filter', 100 );
  }
  
  function my_civicrm_remove_content_filter( $content ) {
      static $done;
      if ( ! isset( $done ) ) {
          remove_filter( 'the_content', [ civi_wp()-&gt;basepage, 'basepage_render' ] );
          $done = true;
      }
      return $content;
  }
  </code></pre>
  <p>This should mean that your second page renders as expected.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T12:23:31.067Z
Answers.Text: @richard-van-oosterhout Add the code above in your `functions.php` file (maybe replacing `my_` with your child theme's custom prefix) and your issue should go away on the base page. If you use Shortcodes, I'll update with further code to fix that.
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T13:45:40.410Z
Answers.Text: Also, you may want to look at the PR I've just opened for a simpler solution: https://github.com/civicrm/civicrm-wordpress/pull/240
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-16T12:16:12.607Z
Answers.LastActivityDate: 2021-02-17T12:21:52.213Z
Answers.LastEditDate: 2021-02-17T12:21:52.213Z
Answers.UserDisplayName: Christian Wach
Body: <p>I got something quite strange and do not how to solve it.
  In my Wordpress 5.6.1 /CiviCRM 5.34 integration (my first WP integration but have am also working with D7/Civi for 8+ years)
  I get a double registration screen. It shows in the main area AND in the footer.</p>
  <p>I am using the native url and not the shortcode.
  <a href="https://www.mydomain.nl/civicrm/event/register/?reset=1&amp;id=12" rel="nofollow noreferrer">https://www.mydomain.nl/civicrm/event/register/?reset=1&amp;id=12</a></p>
  <p>UPDATE: it is only when I use a selected page as a footer in my enfold theme</p>
  <p><a href="https://i.sstatic.net/W8UsB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/W8UsB.png" alt="enter image description here" /></a></p>
  
Tags: <wordpress><civievent>
Title: Double registration form on wordpress?
ThreadText: # Double registration form on wordpress?
  
  (Asked by: username_0 on 2021-02-16)
  
  I got something quite strange and do not how to solve it.
  In my Wordpress 5.6.1 /CiviCRM 5.34 integration (my first WP integration but have am also working with D7/Civi for 8+ years)
  I get a double registration screen. It shows in the main area AND in the footer.
  
  I am using the native url and not the shortcode.
  <https://www.mydomain.nl/civicrm/event/register/?reset=1&id=12>
  
  UPDATE: it is only when I use a selected page as a footer in my enfold theme
  
  [![enter image description here](https://i.sstatic.net/W8UsB.png)](https://i.sstatic.net/W8UsB.png)
  
  **Tags:** wordpress, civievent
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-16. Score: 1
  
  You could use JetPack or another widget visibility plugin to prevent showing the page in the footer when you're on the CiviCRM Base Page.
  EDIT: The following code prevents CiviCRM from overriding the content a second time:
  add_action( 'civicrm_basepage_parsed', 'my_civicrm_disable_content_filter' );
  
  function my_civicrm_disable_content_filter() {
      // Once the CiviCRM filter has run, remove it.
      add_filter( 'the_content', 'my_civicrm_remove_content_filter', 100 );
  }
  
  function my_civicrm_remove_content_filter( $content ) {
      static $done;
      if ( ! isset( $done ) ) {
          remove_filter( 'the_content', [ civi_wp()->basepage, 'basepage_render' ] );
          $done = true;
      }
      return $content;
  }
  
  This should mean that your second page renders as expected.
  
  > **Comments:**
  > **username_1**: @richard-van-oosterhout Add the code above in your `functions.php` file (maybe replacing `my_` with your child theme's custom prefix) and your issue should go away on the base page. If you use Shortcodes, I'll update with further code to fix that.  
  > **username_1**: Also, you may want to look at the PR I've just opened for a simpler solution: https://github.com/civicrm/civicrm-wordpress/pull/240  
  
  ---
  
  