Get record object in function.php file
-
Hi,
I need to get the record object into function.php file.I would like retrieve dynamically a record value to use it into the [pdb_record] shortcode and add a group based on the value of this field..
It’s possible?
Below my simple code into function.php file:
add_shortcode( 'pdb_record_custom', 'pdb_record_custom_shortcode' ); function pdb_record_custom_shortcode() { $record = XXX exist a simple record getter XXX; return '[pdb_record groups="main,'. $record->fields['field_name']->value() .'"]'; }
Tks for the support
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Get record object in function.php file’ is closed to new replies.