Data Publisher demo with WP media library integration

To generate this page functionality you must have WP Data Access version 2.6.1 or later installed.

BrandBrand TypeColorPhotoAttachmentsPriceLicence PlateCategoryFuel TypeMileageEngine CapacityNo Cylinders
BrandBrand TypeColorPhotoAttachmentsPriceLicence PlateCategoryFuel TypeMileageEngine CapacityNo Cylinders

 

Shortcode arguments used for this demo

[wpdataaccess
pub_id=”3″
]

This demo shows an integration of the WordPress media library (read more). It also shows how you can format specific table cells depending on their value. For this example the following line of code was added to column advanced table options in the Data Publisher:

{ "fnRowCallback": "function(row, data, index) { if (data[1]=='Z 800 E ABS') { jQuery(row).find('td:eq(1)').css('color','black'); } else { jQuery(row).find('td:eq(1)').css('color','green'); } }" }

Advanced table options must be written as a JSON string and needs to be on one line. Function fnRowCallback was used in this demo, but the advanced table options column allows you to use any jQuery DataTables option (jQuery DataTable options).

Need help?

Leave a Reply

Your email address will not be published. Required fields are marked *