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 those fields contain lot of texts and image links so if they preloaded it will take lots of time to load whole page.

Related posts

Leave a Reply

1 comment

  1. 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' );
    ?>
    

    →Download ajax-custom


    I hope it helps you and maybe also someone else. I would appreciate a thumbs up. 🙂