Skip to content

Instantly share code, notes, and snippets.

@wplit
Created May 26, 2020 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wplit/95d13d3c6a4561eb61e8f447f5d0934d to your computer and use it in GitHub Desktop.
Save wplit/95d13d3c6a4561eb61e8f447f5d0934d to your computer and use it in GitHub Desktop.
seopress
function sp_titles_template_variables_array($array) {
$array[] = '%%oxygen%%';
return $array;
}
add_filter('seopress_titles_template_variables_array', 'sp_titles_template_variables_array');
function sp_titles_template_replace_array($array) {
if (class_exists('OxygenElement')) {
$array[] = substr(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_meta(get_the_ID(), 'ct_builder_shortcodes', true), true))), 0, 160);
}
return $array;
}
add_filter('seopress_titles_template_replace_array', 'sp_titles_template_replace_array');
@uhlhosting
Copy link

how do you use this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment