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_filter( 'pre_get_posts', 'tgm_io_cpt_search' ); | |
| /** | |
| * This function modifies the main WordPress query to include an array of | |
| * post types instead of the default 'post' post type. | |
| * | |
| * @param object $query The original query. | |
| * @return object $query The amended query. | |
| */ | |
| function tgm_io_cpt_search( $query ) { |
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 | |
| class MyTheme | |
| { | |
| private function actionAfterSetup($function) | |
| { | |
| add_action('after_setup_theme', function() use ($function) { | |
| $function(); | |
| }); | |
| } |
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 | |
| /** | |
| * Register Multiple Taxonomies | |
| * | |
| * @author Bill Erickson | |
| * @link http://www.billerickson.net/code/register-multiple-taxonomies/ | |
| */ | |
| function be_register_taxonomies() { |
NewerOlder