• I’d like to have full posts of upcoming events on the front_page.

    I tried with the following code snippet in functions.php which works somehow. The contents of the events are listed, but I the categories and tags aren’t shown. I’m using the omega theme.

    add_action('pre_get_posts','my_alter_query',5);
    function my_alter_query($query){
          if( $query->is_main_query() && is_front_page ){
            $query->set('post_type', array('event'));
          }
    }

    How do I display the upcoming events on the front_page with tags and categories? Or how can I change what is shown in the main_query?

    https://www.ads-software.com/plugins/event-organiser/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    (Btw the ‘Omega’ theme is not publically available yet. It is pending release on the www.ads-software.com under a different name, on account that a theme ‘Omega’ already exists – which is probably the one you have installed).

    Changing what it shown would involve editing the theme’s templates (or preferably creating a child theme). Does the front page show the date of the event?

    Thread Starter borkenkaefer

    (@borkenkaefer)

    Oh, I don’t use “this” omega theme, but I created a child theme of this one: https://www.ads-software.com/themes/omega

    No, the front page only shows the_content() of the event, no dates or whatsoever …

    Yes, I think that I have to edit the theme’s template, but I don’t know exactly how.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Upcoming events on front_page’ is closed to new replies.