我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何获取meta_key的值并将其发布在任何页面上

I have this in database:

I want to post the meta_value. How to do that? I want for each post_id to post the assigned meta_value on the same page, and that automatically.

How I can retrieve the meta_value and post it?

Try this in your single.php or custom-post-type-single.php

<?php $key_values = get_post_meta( get_the_ID(), 'property_bathrooms' ); ?>

近期文章

  • 有没有办法将所有内联css转换为外部样式表[关闭]
  • 等待AJAX​​在继续Javascript代码之前返回成功?
  • 查询执行[关闭]
  • 获取5条错误消息| PHP [重复]
  • PHP - 未定义索引 - $ _POST隐藏输入
  • PHP项目 - 使用<script> / </ script>
  • PHP页面无法正常工作[关闭]
  • 在PHP中的随机播放功能
  • 查询选择(LEFT JOIN)[关闭]
  • 获取文件最后修改属性的最佳方法
  • Google散点图 - {role:'style'} {role:'tooltip'}无法以JSON格式运行
  • PHP将多维数组合并为一个
  • 以相反的方式获取我桌子上的列表[重复]
  • PHP / MySQL查询没有明显原因停止工作
  • 在javascript if语句中取消设置$ _POST
  • 如何将日期mdy格式转换为ymd格式? [重复]
  • 退出$ _POST中的字符[重复]
  • 默认选择使用php函数[重复]
  • 什么是preg_match条件,以确保第一个数字是7?
  • 如何用document.getElementById('ElementID')替换document.write.innerHTML [关闭]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华