Get_custom_field()

Posted in: Newsmag
Post count: 1

I am adding a custom module and a custom block. I want to add in these a custom_field I have created. I could not find an existing function. can you help.

Post count: 6535

Hi

First you have to register your custom field as a post meta. For more details in this regard please check these links: https://codex.wordpress.org/Custom_Fieldshttps://codex.wordpress.org/Function_Reference/add_post_meta
After you register the custom field as a post meta you can use its value in a variable depending by the desired result.

Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newsmag’ is closed to new topics and replies.