Tuesday, October 4, 2022
HomeWordPress Developmentcustomized publish varieties - register_term_meta not working

customized publish varieties – register_term_meta not working


I’ve a easy code snippet, and looks as if I’m lacking one thing apparent.

add_action( 'init', 'custom_term_meta_setup');
perform custom_term_meta_setup() {
    register_term_meta( 'procedures', 'source_post_id', array(
        'kind' => 'integer',
        'description' => '',
        'single' => true
    ) );
}

I attempted to hook this to some actions that are executed a bit later, comparable to wp_meta, however had no luck.

Tried it in each Docker native env, and in an everyday native (MAMP) WP set up, had no luck.

Tried to do the identical factor with register_meta, unsuccessful.

Tried with sting kind, no luck.

PS:
To see the outcomes, I’m echoing the “procedures” time period I anticipate to get this meta subject:

$phrases = get_term( 49 );
echo "<pre>" . var_export( $phrases, true ) . "</pre>";

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments