Hi @elcos,
I am trying to export an object that has a relation field, which shows me the code in the image link and not the value without all that code, is there a solution?
This looks like a Pods relationship field, is that correct? If so, you’d have to use a PHP function in the export to parse the data and return what you want: https://www.wpallimport.com/documentation/export/pass-data-through-php-functions/.
Here’s an example showing how to get the related post title:
function my_get_title( $relationship_data ) {
if ( empty( $relationship_data ) ) return;
$relationship_data = maybe_unserialize( $relationship_data );
if ( array_key_exists( 'post_title', $relationship_data ) ) {
return $relationship_data['post_title'];
}
}
Thread Starter
elcos
(@elcos)
Hi,
Thanks, i’ll try to make it works