Using our API to display our database on your website

Home Forums Developers Using our API to display our database on your website

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #509
    Nathan Davis
    Keymaster

    Using our API’s can assist you in displaying content from our site on your own website/webpage or blog post.

    If you want to display our Recent Entries page on your website/blog post, you will need to copy and paste the following code to your website/webpage:

    <div id="359" class="frmapi-view" data-url="https://www.78rpmcommunity.com/beta/78rpmcataloger/wp-json/frm/v2/views/359?return=html"></div>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    var frmapi=$('.frmapi-view');
    if(frmapi.length){
    	for(var frmi=0,frmlen=frmapi.length;frmi<frmlen;frmi++){
    		frmapiGetData($(frmapi[frmi]));
    	}
    }
    });
    function frmapiGetData(frmcont){
    	jQuery.ajax({
    		dataType:'json',
    		url:frmcont.data('url'),
    		success:function(json){
    			frmcont.html(json.renderedHtml);
    		}
    	});
    }
    </script>
    #549
    Nathan Davis
    Keymaster

    If you wish to limit the amount of returned entries, you can adjust the code above by adding the following to the URL provided:
    <div id="359" class="frmapi-view" data-url="https://www.78rpmcommunity.com/beta/78rpmcataloger/wp-json/frm/v2/views/359?return=html&limit=X"></div>

    Change the “X(&limit=X) to whatever number you wish.

    • This reply was modified 3 years, 3 months ago by Nathan Davis.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.