[英]How to save a post and custom fields values with ajax in front end in wordpress?
[英]How to load the custom field values of the post via ajax in wordpress
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這些字段包含大量文本和圖像鏈接,因此如果它們預先加載,則加載整個頁面將花費大量時間。
我為你寫了一個插件! 首先從下面的 URL 下載並安裝ajax-custom 。 激活插件后,在您需要這些 AJAX 加載的自定義字段的任何地方插入以下模板標簽。 不要忘記將NAME OF THE FIELD
替換為您要通過 AJAX 加載的自定義字段的實際名稱。
<?php
if( function_exists( 'ac_placeholder' ) )
ac_placeholder( 'NAME OF THE FIELD' );
?>
我希望它可以幫助你,也許還有其他人。 我將不勝感激。 :)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.