Custom Fields Display in Table (SOLVED)
-
Ive been wanting to display the custom fields in the front end table for so long. with some guidance from the developer, and some digging around on my own, i finally got it. here’s the results (youll need to change your ‘type’ to whatever it is in your database)
function wpsctDisplayCustomFieldsToFrontenda($primkey) { global $wpdb; // Custom fields $table_name44 = $wpdb->prefix . "wpscst_tickets"; $table_name33 = $wpdb->prefix . "wpstorecart_meta"; $grabrecord= "SELECT * FROM <code>{$table_name33}</code> WHERE <code>foreignkey</code>= '$primkey' AND <code>type</code>= 'wpsct_custom_72'"; $resultscf = $wpdb->get_results( $grabrecord , ARRAY_A ); return(base64_decode($resultscf[0]['value'])); }
then add this in the <TD> you want
wpsctDisplayCustomFieldsToFrontenda($result['primkey'])
voila!
- The topic ‘Custom Fields Display in Table (SOLVED)’ is closed to new replies.