WordPress Snippet
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 | |
| function defer_js_async($tag){ | |
| // scripts to defer. | |
| $scripts_to_defer = array('script-name1.js', 'script-name2.js', 'script-name3.js'); | |
| // scripts to async. | |
| $scripts_to_async = array('script-name1.js', 'script-name2.js', 'script-name3.js'); | |
| foreach($scripts_to_defer as $defer_script){ |
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 //<~ Remove me | |
| //Removes Title and Description on CPT Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); | |
| //Removes Title and Description on Blog Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' ); | |
| //Removes Title and Description on Date Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' ); | |
| //Removes Title and Description on Archive, Taxonomy, Category, Tag | |
| remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |
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 | |
| //don't include this | |
| /** ==================================================================================== | |
| * Break more link outside the paragraph in the loop on all archives (home, archives, search, etc) | |
| ==================================================================================== **/ | |
| function yourprefix_excerpt_more_link() { |
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 | |
| /* Template Name: Featured Blog with excerpts */ | |
| /** | |
| * Excerpt Length | |
| * | |
| */ | |
| function be_custom_excerpt_length( $length ) { | |
| return 50; |
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 | |
| // don't use | |
| /** ====================================================================================== | |
| * | |
| * Read More the_content_more_link | |
| * Check for the default <!--more--> and change it | |
| * but leave custom <!--more Custom Text--> alone | |
| * | |
| ======================================================================================= */ |
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 | |
| // don't use above. Put this in your functions.php file. | |
| /** ====================================================================================== | |
| * | |
| * Paginate Comments | |
| * | |
| ======================================================================================= */ | |
| function yourprefix_paginate_comments() { |
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 | |
| //* Do NOT include the opening php tag shown above. Copy the code shown below. | |
| //********************************************** | |
| // Setup CTA Button Widget | |
| //********************************************** | |
| /* | |
| * We have three attributes: | |
| * - Button Text |
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 | |
| //* Do NOT include the opening php tag shown above. Copy the code shown below. | |
| /* | |
| * You can find the refrance for supports that Genesis adds | |
| * in the core files lib > admin > inpost-metaboxes.php | |
| */ | |
| //* Remove Action |