Filter not getting triggered
-
It’s not working. Located in functions.php:
add_filter('ghpseo_output', 'my_seo_output', 10, 2); function my_seo_output($output='', $type='main') { echo "hello"; switch ($type) { //case "main": $result = $output; break; //case "main_title": $result = $output; break; //case "secondary_title": $result = $output; break; case "description": if( is_single() ) { $standfirst = get_post_meta($wp_query->post->ID,'subtitle',true); $result = '<meta name="description" content="' . $standfirst . '" />'; } else { $result = $output; } break; default: $result = $output; } return $result; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Filter not getting triggered’ is closed to new replies.