• So, I wanted to change the placement of the post content (ie the event description) in the single event view. I was able to output the content using echo $event->post->post-content but I was unable to remove the content where it was output at the end of the page.

    I first tried editing event-single.php, but then realized that it was being framed by single.php, so I created “single-ai1ec.php” and editing that. It seems that the code in event-single.php is executed by calling the_content(), which is also outputting the content after it executes the event-single.php code. I thought I might hack around this by setting $post->post_content = ' ', but this didn’t work. I then tried in event-single.php to set $event->post->post_content = ' ' after echoing the content elsewhere. Neither worked, even though when I printed out $post and $event, the post_content field appeared to have been effectively cleared in each.

    For now, I’m hiding the redundant content using CSS, but that’s a kind of janky solution. Any insight would be much appreciated.

    https://www.ads-software.com/extend/plugins/all-in-one-event-calendar/

  • The topic ‘Moving the post_content in the single event view’ is closed to new replies.