How to Display All Events Without Limitation

  1. Home
  2. Docs
  3. Januas
  4. Frequently Asked Question...
  5. How to Display All Events Without Limitation

How to Display All Events Without Limitation

You can display all the events on the Homepage by making a small change on the code. First, make sure the events are set to ‘yes’ in the ‘Home page’ settings.

Follow the instructions below.

 

1. Please take a backup of the files that you are about to edit before any updates.

2. Login to your admin dashboard.

3. Navigate to Appearance->Editor. Select Main Index Template (index.php).

4. Look for this code:

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’ => ‘=’
)
)
));

5. Replace it with

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

6. Update the file.

Was this article helpful to you? Yes 1 No