Created
December 8, 2019 14:40
-
-
Save braddalton/a86eece4af53e21b5248af8eaf7b476b to your computer and use it in GitHub Desktop.
Display Posts In One Category On Front Page of Genesis
This file contains 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 | |
/** | |
* @author - Brad Dalton | |
* @link - https://wpsites.net/web-design/display-posts-in-one-category-on-front-page-of-genesis-theme/ | |
* @description - This file adds a custom template which displays posts in Category I.D 007 only | |
* | |
* @author Brad Dalton | |
* @package Customizations | |
*/ | |
/* | |
Template Name: Custom | |
*/ | |
remove_action('genesis_loop', 'genesis_do_loop'); | |
add_action('genesis_loop', 'wpsites_custom_loop'); | |
function wpsites_custom_loop() { | |
$args = array ( 'cat' => 007, 'order' => 'ASC' ); | |
genesis_custom_loop( $args ); | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment