Hello @junkes !
I hope you’re having a great week!
This is because Pods perform a replacement of the metadata stored in the database on the fly. So for example even if the postmeta table contains a relationship field with value 123, what you will actually get when you try getting it with get_post_meta is an array with the post data filled in, not just 123.
Because of this SmartCrawl will not display anything as it checks if the data it got is an array or object and bails out.
To workaround that, you can add the following mu-plugin to wp-content/mu-plugins/pods-smartcrawl-relationship-macro.php to create custom macros:
<?php
add_action( 'wds-known_macros', function( $replacements ){
global $post;
$pods_field_slug = "test"; // please adjust based on your relationship field's actual slug
$value = get_post_meta($post->ID, $pods_field_slug, true);
$replacements['%%pods_relationship_id%%'] = $value["ID"];
$replacements['%%pods_relationship_title%%'] = $value["post_title"];
return $replacements;
} );
Please make sure to adjust the $pods_field_slug variable to match the slug/name of your relationship field.
Here are other fields you can use provided by Pods with example data from my site:
[ID] => 31
[post_author] => 1
[post_date] => 2021-09-22 20:54:39
[post_date_gmt] => 2021-09-22 20:54:39
[post_content] => [forminator_form id="30"]
[post_title] => BAL test
[post_excerpt] =>
[post_status] => publish
[comment_status] => open
[ping_status] => open
[post_password] =>
[post_name] => bal-test
[to_ping] =>
[pinged] =>
[post_modified] => 2021-09-22 20:54:39
[post_modified_gmt] => 2021-09-22 20:54:39
[post_content_filtered] =>
[post_parent] => 0
[guid] => https://dev0.local/?p=31
[menu_order] => 0
[post_type] => post
[post_mime_type] =>
[comment_count] => 0
[pod_item_id] => 31
Hope that helps!
Warm regards,
Pawel