Hide the date an event was created

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 5 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36445

    When viewing an event’s page there is the title of the event at the top of the page and below that is a small clock icon and the date the event was created – this causes confusion as it can be confused as the date of the event itself.
    I can use code to hide the creation date for other posts but it’s not working on these custom post type event pages.
    Can you help please?

    Garry Kelsall
    #36461

    Hi Garry,

    By default the plug-in will use single.php and inject the event content in the post content at runtime. So you should be able to edit that template and wrap the post date inside:

    <?php if ('event' !== get_post_type(get_the_ID())) { ?>
     ...
     <?php } ?>
    

    Alternatively if you create a copy of single.php, named single-event.php – then the plug-in should use that. So you can then remove the date, and then add the line:

     <?php eo_get_template_part( 'event-meta', 'event-single' ); ?>
    

    where you want the event details to be.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.