Show the videos on the media grid first on the home page

  1. Home
  2. Docs
  3. Tyler
  4. Frequently Asked Question...
  5. Show the videos on the media grid first on the home page

Show the videos on the media grid first on the home page

Do the following to display the videos on the media grid first on the home page

1) Please do remember to back-up the files prior to any change.

2) Open wp-content/themes/tyler/event-framework/components/cpts/event-media.php

3) Around line number 25, you can find:

‘supports’ => array (
‘title’,
‘editor’,
‘thumbnail’
)

4) Change this to:

‘supports’ => array (
‘title’,
‘editor’,
‘thumbnail’,
‘page-attributes’
)

5) Save the file.

6) Open wp-content/themes/tyler/event-framework/helpers/cpt/event-medias.php

7) Around line number 13, you can find:

$media_loop_args = array(
‘post_type’ => ‘event-media’,
‘post_status’ => ‘publish’,
‘nopaging’ => true
);

8) Replace this with:

$media_loop_args = array(
‘post_type’ => ‘event-media’,
‘post_status’ => ‘publish’,
‘nopaging’ => true,
‘orderby’=>’menu_order’
);

9) Save the file.

10) Assign order to each post.

Was this article helpful to you? Yes No