Hi,
I wonder if it’s possible to add custom fields to the metadata shortcode selection?
Thanks,
Sebastian
Hey emilconsor,
Thank you for the inquiry.
This should be possible but it will require modification that is beyond the scope of support. You can start by editing the config-templatebuilder/avia-shortcodes/post_metadata/post_metadata.php, and include another condition and the function that renders the output in this block.
switch( $meta['metadata'] )
{
case 'author':
$out = $this->author( $meta );
break;
case 'categories':
$out = $this->taxonomies( $meta, 'categories' );
break;
case 'tags':
$out = $this->taxonomies( $meta, 'tags' );
break;
case 'comments':
$out = $this->comments( $meta );
break;
case 'revisions':
$out = $this->revisions( $meta );
break;
case 'published':
case 'published time':
case 'modified':
case 'modified time':
$out = $this->date_time( $meta );
break;
}
For example, if you select Author, the switch function above will resolve to get the output of the protected function author
and include the associated output in the final html. You can include another condition for custom fields and define your own function that returns the output.
Best regards,
Ismael
Hi Ismael,
thanks for the answer.
I guess It’s too much of a hassle.
But thanks anyway.
Sebastian