Custom post types support in WordLift

怎甘沉沦 提交于 2019-12-23 19:45:58

问题


I am using the WordLift plugin for WordPress and I'd like to add support for Semantic SEO for other custom post types in my web site. Is there a way to do this?


回答1:


Yes, there's a filter you can use to add the custom post types: wl_valid_entity_post_types.

The filter takes an array with the supported post types (by default post, page and entity). You can add custom post types to the array and return it, e.g.:

add_filter('wl_valid_entity_post_types', function ($post_types) { $post_types[] = 'gallery'; return $post_types; });

For reference add a WordPress filter to allow customers to extend the post types that can be turned into entities on GitHub.



来源:https://stackoverflow.com/questions/49011300/custom-post-types-support-in-wordlift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!