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
| /** | |
| * Display RSS feed | |
| * - can be called via shortcode | |
| */ | |
| function display_rss_feed($args) { | |
| extract(shortcode_atts(array( | |
| "rssurl" => 'http://incontactunitedchurch.blogspot.com/feeds/posts/default?alt=rss' | |
| ), $atts)); | |
| // Get a SimplePie feed object from the specified feed source. |
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
| //Enable shortcodes in WordPress SEO generated Meta Description with HTML removed | |
| add_filter( 'wpseo_metadesc', 'am_enable_shortcodes_removed_html' ); //see https://yoast.com/wordpress/plugins/seo/api/ | |
| function am_enable_shortcodes_removed_html($metadesc) { | |
| if( strpos($metadesc, 'et_pb_section') !== FALSE ) { | |
| global $post; | |
| $rendered_content = apply_filters('the_content', $post->post_content); | |
| $newmetadesc = strip_tags( $rendered_content ); | |
| return substr($newmetadesc, 0, 156); |
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 | |
| /* | |
| * customtaxorder_wp_get_object_terms_order_filter | |
| * wp_get_object_terms is used to sort in wp_get_object_terms and wp_get_post_terms functions. | |
| * get_terms is used in wp_list_categories and get_terms functions. | |
| * get_the_terms is used in the the_tags function. | |
| * tag_cloud_sort is used in the wp_tag_cloud and wp_generate_tag_cloud functions (but then the get_terms filter here does nothing). | |
| * Default sorting is by name (according to the codex). | |
| * | |
| */ |
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 | |
| /* Fixes Divi page builder problem not allowing Yoast to auto-generate meta descriptions | |
| * Updated August 22, 2016 | |
| */ | |
| add_filter( 'wpseo_metadesc', 'divi_auto_gen_meta_description' ); //see https://yoast.com/wordpress/plugins/seo/api/ | |
| function divi_auto_gen_meta_description($metadesc) { | |
| if( trim($metadesc) == '' ) { | |
| global $post; | |
| $rendered_content = apply_filters('the_content', $post->post_content); | |
| $newmetadesc = strip_tags( $rendered_content ); |
OlderNewer