I have multiple events active that I want displayed on the homepage but only the next 9 do. How to fix this?

  1. Home
  2. Docs
  3. Januas
  4. Frequently Asked Question...
  5. I have multiple events active that I want displayed on the homepage but only the next 9 do. How to fix this?

I have multiple events active that I want displayed on the homepage but only the next 9 do. How to fix this?

1) Please copy index.php to child theme januas-child

2) Open januas-child/index.php

3) Around line number 18, you can find:

query_posts(array(
‘post_type’ => ‘ja-event’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘ASC’,
‘meta_key’ => ‘januas_eventdata_startdate’,
‘meta_query’ => array(
array(
‘key’ => ‘januas_eventdata_homepage’,
‘value’ => ‘y’,
‘compare’ => ‘=’
)
)
));

4) Change this to:

query_posts(array(
‘post_type’ => ‘ja-event’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘ASC’,
‘posts_per_page’ => -1,
‘meta_key’ => ‘januas_eventdata_startdate’,
‘meta_query’ => array(
array(
‘key’ => ‘januas_eventdata_homepage’,
‘value’ => ‘y’,
‘compare’ => ‘=’
)
)
));

5) Save the file.

Was this article helpful to you? Yes 1 No