WordPress get_post_meta [英] Wordpress get_post_meta
问题描述
我想用 get_post_meta
方法检索到最后张贴图片的 url,但我不知道如何以及需要什么参数.
I want to retrieve url to last post image with get_post_meta
method, but I don't know how, and what paramaters are needed.
推荐答案
基本上 get_post_meta
在 Wordpress 中允许您从放置在特定帖子中的自定义字段中获取自定义值.也许你有一个投票箱,或者一个用户可以在里面放置信息的情绪箱.get_post_meta 可让您从 Wordpress 系统内部获取这些存储的值.
Basically get_post_meta
inside Wordpress allows you to obtain custom values from custom fields that you have placed in a specific post. Perhaps you have a vote box, or a mood box that users can place information inside. get_post_meta lets you obtain those stored values from inside the Wordpress system.
get_post_meta
可让您利用 Wordpress 的自定义字段功能:
get_post_meta
lets you utilize the custom fields functionality of Wordpress:
http://codex.wordpress.org/Custom_Fields
以下是一些在 Wordpress 中使用 get_post_meta 的示例:
Here are some examples of the usage of get_post_meta inside Wordpress:
http://codex.wordpress.org/Function_Reference/post_meta_Function_Examples
这篇关于WordPress get_post_meta的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!