WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Double booking forms is showing up (5 posts)

  1. hixen
    Member
    Posted 2 years ago #

    I did customize my single-event.php to show my booking form in the sidebar, using this code:

    echo $EM_Event->output('#_BOOKINGFORM');

    but I also get one booking form under my content, seems like it's hooking into the end of my:

    the_content();

    How can i disable this? or is something else wrong?

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 2 years ago #

  3. hixen
    Member
    Posted 2 years ago #

    Well, yes, it was there I found the code from you:

    I have now stripped my single-events.php template from everything, and I can still reproduce the error.

    <?php
    	// Titta på denna tråd hur du skall lägga bygga denna template, finns ett bra exempel av agelonwl:
    	// http://wordpress.org/support/topic/events-manager-eventslocation-pages-cant-get-sidebar
    ?>
    
    <?php get_header(); ?>
    
    <div id="content" class="row event">
    
    	<?php
    		global $post;
    		$EM_Event = em_get_event($post->ID, 'post_id');
    	?>
    
    	<?php /* Start loop */ ?>
        <?php while (have_posts()) : the_post(); ?>
    
        <?php the_content(); ?>
    
    	<?php endwhile; /* End loop */ ?>
    
    </div><!-- /#content -->
    
    <?php get_footer(); ?>

    The booking form still shows under my content the_content();

  4. hixen
    Member
    Posted 2 years ago #

    In em-event-post.php on line 51, there is a function called the_content, it's hooking into my the_content, how can I disable this, without editing core files?

    Was this function intended to only work on page templates?

  5. agelonwl
    Member
    Posted 2 years ago #

    can you try to remove

    <?php /* Start loop */ ?>
     <?php while (have_posts()) : the_post(); ?>
     <?php the_content(); ?>
    <?php endwhile; /* End loop */ ?>

    and replace with something like

    <header class="entry-header">
     <h1 class="entry-title">
       <?php echo $EM_Event->output('#_EVENTNAME'); ?>
     </h1>
    </header>
    <div class="entry-content">
     <p><?php echo $EM_Event->output('#_EVENTNOTES'); ?></p>
     <p><?php echo $EM_Event->output('#_BOOKINGFORM'); ?></p>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic