Hi
How can i add, or activate the custom fields withing the portfolio items in the enfold theme?
I would like to filter the portfolio items with a query search plugin like “Advance WP Query Search Filter” or something similar if someone has a good idea for that as well.
Thanks for Answers
The portfolio items do not support custom fields out of the box but you can implement them with: http://codex.wordpress.org/Function_Reference/get_post_meta
You can insert the code in enfold/includes/loop-portfolio-single.php – i.e. insert it below:
the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> →</span>');
A sample code would be
the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> →</span>');
$mymeta = get_post_meta( get_the_ID(), 'mymetavalue' );
echo $mymeta;
This code would display the content of the custom field with the key/id “mymetavalue”.
Hi Dude
Thanks for your answer. I try that code, but it dosn’t display me the custom field box.
Maybe i did explain myself wrong.
What i’m looking for is, to have this box:
http://codex.wordpress.org/images/7/7f/custom_field_example.jpeg
So that i can add custom fields while i’m creating some portfolios.
Hey!
Ah ok :)
Open up wp-contentthemesenfoldincludesadminregister-portfolio.php and replace
'supports' => array('title','thumbnail','excerpt','editor','comments')
with
'supports' => array('title','thumbnail','excerpt','editor','comments','custom-fields')
Best regards,
Peter
Thank you. That works