[wp-trac] [WordPress Trac] #55946: `post_tag` is not supporting in rest api for custom meta

WordPress Trac noreply at wordpress.org
Sat Jun 11 06:36:16 UTC 2022


#55946: `post_tag` is not supporting in rest api for custom meta
--------------------------+------------------------------
 Reporter:  kapilpaul     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  5.9.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by lopo):

 Hi @kapilpaul, are you sure it's not a bug in the plugins you're using?
 If I add e.g.

 {{{
 register_meta(
                 'term',
                 'custom',
                 array(
                                 'single'       => true,
                                 'type'         => 'string',
                                 'default'      => 'foobar',
                                 'show_in_rest' => true,
                 )
 );
 }}}

 both tags and categories display `"meta":{"custom":"foobar"}` when queried
 via REST API.
 If I add a custom meta via ACF, instead I can definitely see that missing
 in tags (but not in categories).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55946#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list