admin管理员组文章数量:1420220
I need to put a block on a page that displays 'highlighted posts' manually.
First of all, I do not know if there is a better way to do this, creating a new block, or using an existing plugin ... (Maybe I should clone one of these blocks and add the functionality for my case but I'm not sure)
The idea that I have is to be able to use an existing block, for example: 'List of posts' exiting in the 'Gutenberg' editor, or the 'Grid of posts' in the 'Ultimate Addons for Gutenberg' plugin, which I have installed in my WP. and then, adding a new field to it in order to filter the posts.
For this I have added a new field to the posts called 'highlight_in'. which could take values like ('home.top', 'home.moreviews', 'shop.moreviews'...)
My question is that I do not know how to add a new filter for 'highlight_in' field in a block of post I commented before.
NOTE: I should also make a 'SELECT posts WHERE highlight_in LIKE %filter_value%' query to be able to highlight the post in more than one page / block.
I do not know if there are here too many things for a question. So If necessary, I modify or divide the content of this question. Thanks.
本文标签: Add filter by custom field to block of posts
版权声明:本文标题:Add filter by custom field to block of posts 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745325287a2653563.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论