• Resolved johnschmitzgt

    (@johnschmitzgt)


    I’m using the Event Organizer plug-in for a calendar, and I’m trying to embed the information about an event from the calendar into a normal post. If I use the button to insert it with one of the display settings (e.g. ‘title’ or ‘content’), the event does embed, but incorrectly. The title embeds OK, but the ‘content’ display shows only the descriptive text for the event, not the date, venue information, map, etc. that would be shown on a single event page.

    I’ve tried using a custom template, starting from one of the templates EO provides, but when I do that, the EO plug-in crashes. This is apparently because the environment is not set up to the event post, which all the EO functions in the template assume. That seems like it must be necessary for the title and content to work.

    I also tried “all custom tags” because the crash is associated with the event start date, which would be a custom field for the ‘event’ post type, but that just resulted in displaying the title (which I don’t want – it’s only necessary on a stand-alone event page) and then only the text content. IOW, all the event-specific content is still missing.

    Insert seems to work fine on normal posts.

    Thanks,
    John

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Paul Ryan

    (@figureone)

    Plugin Author Paul Ryan

    (@figureone)

    I was able to get it working using the “single-event.php” sample template provided by the Event Organiser plugin author, with the following additions:

    Add a “Template Name:” header to the template when you copy it to your theme folder:
    /* Template Name: EO Single Event */

    Populate the $post->occurrence_id variable right after your loop in the template. You’ll need to follow up with the developer of the other plugin to figure out how they are populating that nonstandard variable, and then maybe we can figure out why it’s not getting set in the Insert Pages loop.
    Example custom template loop (here I just set the occurrence_id to 1, which won’t be valid in all cases):

    
    <?php while ( have_posts() ) : the_post(); ?>
      <?php global $post; $post->occurrence_id = 1; ?>
    • This reply was modified 7 years, 5 months ago by Paul Ryan.
    • This reply was modified 7 years, 5 months ago by Paul Ryan.
    Thread Starter johnschmitzgt

    (@johnschmitzgt)

    Yes, exactly.

    Thread Starter johnschmitzgt

    (@johnschmitzgt)

    Thanks for the great support. I tried making a template out of single-event.php, adding the line setting $post->occurrence_id, but I still get the error (I tried IDs of 1 and 0). I’ll try asking the EO developer.
    Thanks,
    John

    I am using theeventscalender… and have the same problem

    • This reply was modified 7 years, 4 months ago by robov.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Content of event page doesn’t insert’ is closed to new replies.