程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

How do i get image url from custom feilds anywhare

发布于2023-03-19 05:12     阅读(1063)     评论(0)     点赞(0)     收藏(4)


<body <?php body_class(); ?>>
<?php 
    echo $image_url = get_field('video_tab_thumb');
?>
<script type="text/javascript">
var tab_img_url = "<?php echo $image_url; ?>";
</script>

**I want this URL anywhere but it's showing only post page **


解决方案


You have different ways

  1. Store it in the database and fetch in anywhere
  2. Use the cache and store it for example in the redis or file or somewhere eles and then fetch it
  3. Store it in the session and get it again anywhere

And ...
They are just some ways that comes to my mind and I hope this could help you



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:http://www.phpheidong.com/blog/article/515614/d0c8501a7886008b6d84/

来源:php黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

0 0
收藏该文
已收藏

评论内容:(最多支持255个字符)