Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #1467

    Hey I love the theme, great job! We have many portfolio items and add more at least once a week. Google and other search engines are not indexing these pages because they don’t have a proper title and description. I am using the “HeadSpace” plug-in that helps generate tags and it’s been great so far. However, I would love to be able to add a simple title and description to each portfolio item.

    Could we accomplish this with Custom Fields? Custom fields aren’t available for the Portfolio Items either…

    Thanks in advance for your help!


    To add custom fields to portfolio items open up /theme_options/portfolio.php and find this code:

    'supports' => array('title','thumbnail','excerpt','editor','comments')

    Change it to this:

    'supports' => array('title','thumbnail','excerpt','editor','comments', 'custom-fields')

    This adds custom fields support to the Portfolio post type so you can add your title, etc.

    to add custom fields to html text just use following php code:

    <?php get_post_meta($post->ID, 'my_field', true); ?>

    Please change my_field to the name of your custom field.


    Thanks Dude!


    Glad that I could help.


    Where should I add the “get_post_meta” php code to add custom fields to the html text.


    You need to add your permalink code to this code in kriesi_post_thumb.php:

    $defaultimage = $linkwrap[0]."<img ".$img_attr_string." src='".$image_URL."' alt='' title='".get_the_title()."' height='".$option['wh']['height'] ." ' width='".$option['wh']['width'] ."' />".$linkwrap[1];

    so it looks like

    $defaultimage = $linkwrap[0]."<img ".$img_attr_string." src='".$image_URL."' alt='".get_post_meta($post->ID, 'alt_field', true)."' title='".get_the_title()."' height='".$option['wh']['height'] ." ' width='".$option['wh']['width'] ."' />".$linkwrap[1];


    Sorry to be a pain, but it keeps giving me a syntax error. I know that I’m missing a small detail here…

    I placed the new code in the kriesi_post_thumb.php and changed ‘alt_field’ to my custom field. Am I doing something wrong or not adding the right code somewhere?


    I made a small mistake – I forgot a . in the syntax above. I’ve updated it, please try it again.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Portfolio Title Description and Meta Data’ is closed to new replies.