• Resolved kornchu

    (@kornchu)


    Greeting, Your Plugin are really awesome and easy to understand. But it’s still not friendly for post content yet because Event dates and Categories appear on top of every post that’s created with this plugin and they can’t move or hide them that makes post look less beautiful. It would be really nice if we could edit their layouts, move them somewhere, or disable them from post contents

    • This topic was modified 1 year, 2 months ago by kornchu.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ishitaka

    (@ishitaka)

    Hi,

    In the template file, you can change it.

    Example:

    Add the following code in the loop of the “single-xo_event.php” file created by duplicating the theme’s “single.php” or “single.php”.

    <?php if ( is_singular( 'xo_event' ) && $xo_event_calendar ) : ?>
    	<div class="xo-event-meta-details">
    	<div class="xo-event-meta">
    	<span class="xo-event-date">Event date: <?php echo $xo_event_calendar->get_event_date( $post->ID ) ?></span>
    	<span class="xo-event-category">Categories: <?php echo get_the_term_list( $post->ID, 'xo_event_cat', '', ', ', '' ); ?></span>
    	</div>
    	</div>
    <?php endif; ?>
    
    Thread Starter kornchu

    (@kornchu)

    Thank for your repile,

    But I still don’t understand which or where I have to duplicate and add your code in??? Should I do that in “\wp-content\themes\twentytwentyone” where ?“single.php” is in there? But I used the “twenty twenty-three” theme and custom template by site editor on my site.

    It’s really complicated. It would be nice if you added the Event date and Categories block that would make things easier to customize than override the template file by hardcoding

    Plugin Author ishitaka

    (@ishitaka)

    I would like to add event date and category blocks in a future version.

    In the current version, please remove the default display and display it with the xo_event_field shortcode.

    functions.php:

    if ( $xo_event_calendar ) {
    	remove_filter( 'template_include', array( $xo_event_calendar, 'template_include' ) );
    }
    

    Shortcode block:

    Event date: [xo_event_field filed="start_date"]
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t edit “Event date and Categories” that display on top of contents’ is closed to new replies.