• Resolved rowlandville

    (@rowlandville)


    I use a piece of code on many sites (and on every page of the problem site) without issue. But there is something in the calendar’s code that is causing the calendar to print twice on the calendar page.

    Functions.php code:

    function show_multiple_post($multpath) {
      $post = get_page_by_path($multpath);
      $multcontent = apply_filters('the_content', $post->post_content);
      echo $multcontent;
    }

    Page.php code:

    <?php pause_exclude_pages(); ?>
    <?php show_multiple_post('special-week'); ?>
    <?php $multcontent = apply_filters('the_content',$include[0]->post_content); ?>
    <?php resume_exclude_pages(); ?>

    Notice the problem on the calendar page. Click on any other page and notice the correct layout at the top right of the header. http://rowlandwilliams.com/angels/whos-playing-when/

    I have removed pieces of the code on page.php. When I remove the second line of code, the calendar prints only once. I have also tried removing ‘special-week’ (the name of the WordPress page that populates the content), and as long as I leave in the single quotes, the problem persists.

    Thank you for any help you can lend!

    https://wordpress.org/plugins/events-manager/

Viewing 1 replies (of 1 total)
  • Thread Starter rowlandville

    (@rowlandville)

    I am still baffled by this, but nobody responded, and so I grabbed a plugin and that is functioning as I wanted. (But I am still curious why this occurred.)

Viewing 1 replies (of 1 total)
  • The topic ‘Code Conflict Causing Calendar to be Printed Twice’ is closed to new replies.