Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26967

    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

    #132279

    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">  &rarr;</span>');

    A sample code would be

    the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</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”.

    #132280

    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.

    #132281

    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

    #132282

    Thank you. That works

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Portfolio Items – Custom fields’ is closed to new replies.