fbpx

How can we help?

Dealing with problematic themes

Due to highly custom or poorly coded single.php template, some themes do not work normally with single event pages.

WP Event Manager requires the following things to work properly.

  • Content being output via the_content() function. For more information, click here.
  • A valid ‘loop’. For more information, click here.

Determining if the problem is caused by the themes

To check if the issue is caused by the themes, change to Twenty Twelve theme in WordPress and compare your page to the demo.

Fixing your single template

Events are custom post types so you can use the template hierarchy according to the requirement.

single-event_listing.php template file in your theme is always used for events. For starting, you can copy the contents of single.php or page.php to this file so it contains the HTML your theme uses.

Now you can customize the single-event_listing.php template, removed and added new code and valid loop.

A valid loop

Here is a sample of a legitimate loop, complete with heading and substance/content:


<?php while ( have_posts() ) : the_post(); ?>

    <h1 class="entry-title"><?php the_title(); ?></h1>

    <div class="entry-content">
        <?php the_content(); ?>
    </div>

<?php endwhile;  ?>

Was this article helpful?
How can we improve this article?