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('the_content', 'remove_fusion_shortcodes', 20, 1); | |
| function remove_fusion_shortcodes( $content ) { | |
| $content = preg_replace('/\[\/?fusion.*?\]/', '', $content); | |
| return $content; | |
| } | |
| ?> | |
| **Tested with WP All Import and Export** |
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
| //* Remove the link from each post titles in a specific category | |
| add_filter( 'genesis_post_title_output', 'uca_post_title_output', 15 ); | |
| function uca_post_title_output( $title ) { | |
| if ( in_category( 'uncategorized' ) || in_category( 'category-2' )) { | |
| $title = sprintf( '<h2 class="entry-title">%s</h2> ', apply_filters( 'genesis_post_title_text', get_the_title() ) ); | |
| return $title; | |
| } | |
| return $title; | |
| } |
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
| /** Andrew Norcross - Date Modified Display - http://andrewnorcross.com/tutorials/modified-date-display/ */ | |
| // Post Columns | |
| add_action ( 'manage_posts_custom_column', 'rkv_post_columns_data', 10, 2 ); | |
| add_filter ( 'manage_edit-post_columns', 'rkv_post_columns_display' ); | |
| function rkv_post_columns_data( $column, $post_id ) { | |
| switch ( $column ) { | |
| case 'modified': | |
| $m_orig = get_post_field( 'post_modified', $post_id, 'raw' ); | |
| $m_stamp = strtotime( $m_orig ); | |
| $modified = date('n/j/y @ g:i a', $m_stamp ); |
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
| January 2018 | |
| 2: Science Fiction Day #ScienceFictionDay | |
| 4: National Trivia Day #NationalTriviaDay | |
| 5: National Bird Day #NationalBirdDay | |
| 8: Clean Off Your Desk Day #CleanOffYourDeskDay | |
| 11: Human Trafficking Awareness Day #HumanTraffickingDay | |
| 13: National Sticker Day #NationalStickerDay | |
| 15: Martin Luther King, Jr. Day #MLKDay | |
| National Hat Day #NationalHatDay | |
| 18: Get to Know Your Customers Day (third Thursday of every quarter) #GetToKnowYourCustomersDay |
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 | |
| // This adds logo to header, adds page title if using special page template, and... | |
| // | |
| // Here goes the logo in Header | |
| // | |
| add_action( 'genesis_header', 'ursidae_site_image', 5 ); | |
| function ursidae_site_image() { | |
| if ( is_page_template( array( 'page_special.php', 'page_other_special.php' ) ) ) { |
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 | |
| // Allow Editors to manage Widgets and Menus | |
| function sp_editor_capabilities() { | |
| $editor = get_role( 'editor' ); | |
| if (!$editor->has_cap( 'edit_theme_options' ) ) { | |
| $editor->add_cap( 'edit_theme_options' ); | |
| } |
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
| //Originally found here: https://www.kvcodes.com/2015/12/delete-all-post-meta-except-thumbnail-in-wordpress-posts/ | |
| //Copy from line 3 to the end and paste into your theme's function file. | |
| function kv_delete_all_meta_except_featuredimg(){ | |
| $args = array( 'posts_per_page' => -1, 'post_status' => 'any', 'post_type' => array('attachment', 'page','post')); | |
| $articles= get_posts( $args ); | |
| foreach($articles as $article){ | |
| if($article->post_type == 'attachment'){ | |
| $myvals = get_post_meta($article->ID); | |
| foreach($myvals as $key=>$val) { |
OlderNewer