Im working on my website and i'm trying to get custom fields to work. I have a page with 3 custom fields added (Experience1, Experience2, Experience3). Each of these fields have a value like "HTML/CSS - 2 Years".
Anyway I am trying to pull the value of these fields to display on part of my website. I tried using the code here but had no luck. Below is a snippet of my code:
  <ul class="about-list">
    <li><?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'Experience1', true);
?></开发者_运维知识库li>
    <li><?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'Experience2', true);
?></li>
    <li><?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'Experience3', true);
?></li>
</ul>
Thanks for your help!
use like this
echo get_post_meta($post->ID,'Experience1', true);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论