Created
June 25, 2018 19:57
-
-
Save BinaryMoon/d083867ffc74f54e4374be244e067a9f to your computer and use it in GitHub Desktop.
Filter Jetpack Featured Content
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 | |
/** | |
* Plugin Name: Change Featured Content Properties | |
* Plugin URI: https://prothemedesign.com | |
* Description: Change featured content properties | |
* Author: Ben Gillbanks | |
* Version: 1.0 | |
* Author URI: https://prothemedesign.com | |
* Text Domain: romero | |
*/ | |
function romero_jetpack_init_featured_content() { | |
add_theme_support( | |
'featured-content', | |
array( | |
'featured_content_filter' => 'romero_get_featured_posts', | |
'max_posts' => 4, | |
'post_types' => array( 'post', 'page', 'jetpack-portfolio' ), | |
) | |
); | |
} | |
add_action( 'after_setup_theme', 'romero_jetpack_init_featured_content', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment