{"id":232,"date":"2026-03-27T12:51:21","date_gmt":"2026-03-27T12:51:21","guid":{"rendered":"https:\/\/nativecustomfields.com\/?post_type=ncf-documentation&#038;p=232"},"modified":"2026-03-27T12:51:21","modified_gmt":"2026-03-27T12:51:21","slug":"accessing-data","status":"publish","type":"ncf-documentation","link":"https:\/\/nativecustomfields.com\/docs\/developer-guide\/accessing-data\/","title":{"rendered":"Accessing Data"},"content":{"rendered":"<div class=\"wp-markdown-block theme-github wp-block-telex-block-telex-wp-markdown-block\" data-theme=\"github\">\n\t\t\t<div class=\"markdown-body\">\n\t\t<h2 id=\"3-accessing-data-with-native-wordpress-functions\">3) Accessing Data with Native WordPress Functions<\/h2>\n<p>Use standard WordPress APIs to read or write values:<\/p>\n<h3 id=\"3-1-post-meta\">3.1 Post Meta<\/h3>\n<p>To access post meta values, use <code>get_post_meta()<\/code> function with the following parameters:<\/p>\n<p><code>get_post_meta( $post_id, $meta_key, true )<\/code><\/p>\n<p>Example:<\/p>\n<pre><code class=\"language-php\">$subtitle = get_post_meta( 123, &#039;book_subtitle&#039;, true );\n<\/code><\/pre>\n<h3 id=\"3-2-term-meta\">3.2 Term Meta<\/h3>\n<p>To access term meta values, use <code>get_term_meta()<\/code> function with the following parameters:<\/p>\n<p><code>get_term_meta( $term_id, $meta_key, true )<\/code><\/p>\n<p>Example:<\/p>\n<pre><code class=\"language-php\">$term_icon = get_term_meta( 45, &#039;genre_icon&#039;, true );\n<\/code><\/pre>\n<h3 id=\"3-3-user-meta\">3.3 User Meta<\/h3>\n<p>To access user meta values, use <code>get_user_meta()<\/code> function with the following parameters:<\/p>\n<p><code>get_user_meta( $user_id, $meta_key, true )<\/code><\/p>\n<p>Example:<\/p>\n<pre><code class=\"language-php\">$twitter = get_user_meta( 7, &#039;twitter_profile&#039;, true );\n<\/code><\/pre>\n<hr \/>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"parent":229,"menu_order":0,"template":"","meta":[],"class_list":["post-232","ncf-documentation","type-ncf-documentation","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nativecustomfields.com\/wp-json\/wp\/v2\/ncf-documentation\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nativecustomfields.com\/wp-json\/wp\/v2\/ncf-documentation"}],"about":[{"href":"https:\/\/nativecustomfields.com\/wp-json\/wp\/v2\/types\/ncf-documentation"}],"author":[{"embeddable":true,"href":"https:\/\/nativecustomfields.com\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/nativecustomfields.com\/wp-json\/wp\/v2\/ncf-documentation\/229"}],"wp:attachment":[{"href":"https:\/\/nativecustomfields.com\/wp-json\/wp\/v2\/media?parent=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}