Support » Plugin: Simpul Events by Esotech » [Plugin: Simpul Events by Esotech] Make events appear as normal posts on front page

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author geilt

    (@geilt)

    Yes it is possible, you can just access the post type “events” using WP_Query

    Such as

    $events = new WP_Query(‘post_type’ => ‘events’);

    while( $events->have_posts() ): $events->the_post();
    the_content();
    endwhile;

    Add any other parts of the query you need and content you need.

    Also, the plugin does it as a widget, just disable the calendar and click to show post.

    thanks for the quick reply,

    I’m afraid I’m going to need more detailed instructions as my knowledge and skills are very basic :/

    Plugin Author geilt

    (@geilt)

    You would have to add this to front-page.php or whatever template your home page uses.

    <?php
    $events = new WP_Query( array(‘post_type’ => ‘events’,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => 5));

    while( $events->have_posts() ): $events->the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    endwhile;
    ?>

    Try it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Simpul Events by Esotech] Make events appear as normal posts on front page’ is closed to new replies.