Last active
March 28, 2016 16:09
-
-
Save mavieth/297cc37ec79d712530e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('pre_get_posts', 'filter_categories_homepage'); | |
| function filter_categories_homepage($query) { | |
| if ($query->is_main_query() && is_home()) { | |
| $query->set('category_name','tutorials'); | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment