functions - I am trying to set post terms to a custom taxonomy

I have a custom taxonomy that I would like to update on posts using a PHP function.An example of what I am trying to a

I have a custom taxonomy that I would like to update on posts using a PHP function. An example of what I am trying to achieve is the following:

Array
(
    [0] => WP_Term Object
        (
            [term_id] => 183
            [name] => Spotlight
            [slug] => spotlight
            [term_group] => 0
            [term_taxonomy_id] => 183
            [taxonomy] => deals_tiers
            [description] => 
            [parent] => 0
            [count] => 5
            [filter] => raw
            [term_order] => 0
        )    
)

I am trying to set this on posts that have no data in these fields. This can be achieved in the backend by checking the "Spotlight" checkbox but I would like to do this via a function. Any help would be greatly appreciated.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745329578a4622814.html

相关推荐

  • functions - I am trying to set post terms to a custom taxonomy

    I have a custom taxonomy that I would like to update on posts using a PHP function.An example of what I am trying to a

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信