Is it possible to add custom fields for portfolio items via child theme?
I found this:
https://kriesi.at/support/topic/portfolio-items-custom-fields/
But it only seems to work with the main template.
Hi kunzi!
Add this to your child theme functions.php file.
add_filter( 'avf_portfolio_cpt_args', 'enfold_customization_portfolio_fields', 1 );
function enfold_customization_portfolio_fields( $args ) {
$args['supports'] = array( 'title','thumbnail','excerpt','editor','comments', 'custom-fields' );
return $args;
}
Regards,
Elliott
And how do I display added custom field at the portfolio page?
Or would it be somehow possible to display the content of the custom field next to the page title (on the same row as the breadcrumb)?
Hey!
Displaying in the breadcrumbs would have to be considered custom work. But to answer your question, you can use the get_post_meta() function, https://developer.wordpress.org/reference/functions/get_post_meta/, to display the custom fields.
Regards,
Elliott