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
| function sp_sitemaps_html_query($args, $cpt_key) { | |
| //Default Query | |
| //$args = array('posts_per_page' => 1000,'order'=> $seopress_xml_sitemap_html_order_option,'orderby' => $seopress_xml_sitemap_html_orderby_option,'post_type' => $cpt_key,'post_status' => 'publish','meta_query' => array( array( 'key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS' ) ),'fields' => 'ids','exclude' => $seopress_xml_sitemap_html_exclude_option,'suppress_filters' => false); | |
| if ($cpt_key =='page') { //If page post type, order page by admin menu order $args['order'] = 'ASC'; | |
| $args['orderby'] = 'menu_order'; | |
| return $args; | |
| } else { | |
| return $args; | |
| } | |
| } |
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
| function sp_sitemaps_index_gnews_query($args) { | |
| //Default Query | |
| //$args = array('post_type' => $seopress_xml_sitemap_news_cpt_array, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'posts_per_page' => 1, 'orderby' => 'modified', 'meta_key' => '_seopress_robots_index', 'meta_value' => 'yes', 'meta_compare' => 'NOT EXISTS', 'order' => 'DESC', 'lang' => ''); | |
| $args['post_status'] = 'pending'; | |
| return $args; | |
| } | |
| add_filter('seopress_sitemaps_index_gnews_query', 'sp_sitemaps_index_gnews_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
| function sp_sitemaps_index_cpt_query($args, $cpt_key) { | |
| //Default Query | |
| //$args = array('post_type' => $cpt_key, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'posts_per_page' => 1, 'meta_query' => array( array( 'key' => '_seopress_robots_index', 'value' => 'yes', 'compare' => 'NOT EXISTS' ) ), 'order' => 'DESC', 'orderby' => 'modified', 'lang' => ''); | |
| $args['orderby'] = 'date'; | |
| return $args; | |
| } | |
| add_filter('seopress_sitemaps_index_cpt_query', 'sp_sitemaps_index_cpt_query', 10, 2); |
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
| function sp_social_og_locale($html) { | |
| //you can add here all your conditions as if is_page(), is_category() etc.. | |
| $html = '<meta property="og:locale" content="en_US" />'; | |
| return $html; | |
| } | |
| add_filter('seopress_social_og_locale', 'sp_social_og_locale'); |
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
| function sp_gtag_cd_logged_in_cf($html) { | |
| return "'dimension5': 'cd_logged_in',"; | |
| } | |
| add_filter('seopress_gtag_cd_logged_in_cf', 'sp_gtag_cd_logged_in_cf'); | |
| function sp_gtag_cd_logged_in_ev($html) { | |
| return "gtag('event', '".__('Connected users','wp-seopress')."', {'cd_logged_in': '".wp_get_current_user()->ID."'});"; | |
| } | |
| add_filter('seopress_gtag_cd_logged_in_ev', 'sp_gtag_cd_logged_in_ev'); |
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
| function sp_titles_desc($html) { | |
| //you can add here all your conditions as if is_page(), is_category() etc.. | |
| $html = 'my meta description'; | |
| return $html; | |
| } | |
| add_filter('seopress_titles_desc', 'sp_titles_desc'); |
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
| function sp_titles_noimageindex($html) { | |
| //you can add here all your conditions as if is_page(), is_category() etc.. | |
| $html = 'noimageindex'; | |
| return $html; | |
| } | |
| add_filter('seopress_titles_noimageindex', 'sp_titles_noimageindex'); |
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
| function sp_titles_robots($html) { | |
| //you can add here all your conditions as if is_page(), is_category() etc.. | |
| $html = '<meta name="robots" content="noindex"/>'; | |
| return $html; | |
| } | |
| add_filter('seopress_titles_robots', 'sp_titles_robots'); |
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
| function sp_titles_noarchive($html) { | |
| //you can add here all your conditions as if is_page(), is_category() etc.. | |
| $html = 'noarchive'; | |
| return $html; | |
| } | |
| add_filter('seopress_titles_noarchive', 'sp_titles_noarchive'); |
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
| function sp_titles_nofollow($html) { | |
| //you can add here all your conditions as if is_page(), is_category() etc.. | |
| $html = 'nofollow'; | |
| return $html; | |
| } | |
| add_filter('seopress_titles_nofollow', 'sp_titles_nofollow'); |