如何在Word preSS通过AJAX加载后的自定义字段值 [英] How to load the custom field values of the post via ajax in wordpress
问题描述
我不是一个PHP程序设计师,不知道有关数据获取什么,但我想使在字$ P $加载该职位的自定义字段值通过AJAX PSS我想原因模板使用AJAX是因为这些字段包含大量的文字和图片链接,所以,如果他们preloaded这将需要大量的时间来加载整个页面加载值。
I am not a php programer and don't know anything about data fetching, but i am trying to make a template that loads the custom field values of the post via ajax in wordpress the reason i would like to load the values using ajax is because those fields contain lot of texts and image links so if they preloaded it will take lots of time to load whole page.
推荐答案
我写了一个插件,为您服务!首先下载并安装的阿贾克斯定制的从下面的网址。当插件被激活,插入你的主题下面的模板标签无处不在,你需要这些AJAX加载的自定义字段。不要忘了与你想通过AJAX加载自定义字段的实际名称替换字段的名称
I wrote a plugin for you! First download and install ajax-custom from the URL below. When the plugin is activated, insert the following template tag in your theme everywhere you need these AJAX-loaded custom-fields. Don't forget to replace NAME OF THE FIELD
with the actual name of the custom field you want to load via AJAX.
<?php
if( function_exists( 'ac_placeholder' ) )
ac_placeholder( 'NAME OF THE FIELD' );
?>
→下载的阿贾克斯定制的
我希望它可以帮助你,也许还有其他人。我想AP preciate竖起了大拇指。 :)
→Download ajax-custom
I hope it helps you and maybe also someone else. I would appreciate a thumbs up. :)
这篇关于如何在Word preSS通过AJAX加载后的自定义字段值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!