Content doubled on front-end on recently edited or created pages

Hello. It seems that recently on this site (http://www.longviewithaca.org/) editing or adding any new pages results in the content being duplicated on that page. My client edited the home page and the Careers page (http://www.longviewithaca.org/about/careers/) and you can see the content is doubled on both of those pages. The content is not doubled in the Pro editor.

I tested by creating a new page from scratch (http://www.longviewithaca.org/test-content/) where I added only a single text block. And you can see that text block appears twice on the front-end. The text is not repeated in the Pro editor.

This is not happening on all pages, just ones that have been recently created or edited in Pro. There is no caching, CSS/JS-minifying or anything like that installed on this site. Running Wordpress 5.6, and Pro 4.0.11. Any ideas what might be causing this?

Hi @awpny,

Thanks for reaching out.

There could be a plugin or custom code that interacts with the double content on the front-end.

I recommend the following troubleshooting procedures before we investigate the settings.

  1. TESTING FOR THEME RELATED ISSUE
  2. TESTING FOR PLUGIN CONFLICT
  3. THEME UPDATE
  4. CHILD THEME
  5. CSS/JS CUSTOMIZATION
  6. VERSION COMPATIBILITY

Only if none of that helps, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

Added a secure note. Thank you.

Hello @awpny,

You are experiencing the issue because you have added this code in your child theme’s functions.php:

// Allow Cornerstone content to be added to the pre-footer
// =============================================================================
add_action( 'x_before_site_end', 'longview_show_prefooter_content', 0);

function longview_show_prefooter_content() {
  $events_content_id = get_page_by_title('Prefooter Content')->ID;
  $content = apply_filters('the_content', get_post_field('post_content', $events_content_id));

  echo $content;
}

I went ahead and temporarily commented out the action line so that it will no longer occur on your site. Kindly check your site now.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.