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
| add_action( 'genesis_before_loop', 'sk_excerpts_search_page' ); | |
| function sk_excerpts_search_page() { | |
| if ( is_search() ) { | |
| add_filter( 'genesis_pre_get_option_content_archive', 'sk_show_excerpts' ); | |
| } | |
| } | |
| function sk_show_excerpts() { | |
| return 'excerpts'; | |
| } |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 hook | |
| add_filter( 'wp_nav_menu_objects', 'my_wp_nav_menu_objects_sub_menu', 10, 2 ); | |
| // filter_hook function to react on sub_menu flag | |
| function my_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) { | |
| if ( isset( $args->sub_menu ) ) { | |
| $root_id = 0; | |