Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sqr_check_bbpress_components_add_schema() {
- /* If bbpress plugin it's active add schema for their forum/topics components */
- if(class_exists( 'bbPress')) {
- if (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_single_forum() || bbp_is_single_topic() || bbp_is_single_reply() || bbp_is_single_view()) {
- add_filter('kleo_schema_org_type', function () {
- return 'DiscussionForumPosting';
- });
- }
- }
- }
- add_action('wp', 'sqr_check_bbpress_components_add_schema');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement