Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4713

    Hello, I am setting up an extensive portfolio to showcase various sale horses.

    The main portfolio will list all the categories of horses and I’d like each portfolio entry to link to a portfolio page that showcases the horses of that type available for sale.

    Could anyone walk me through how to link a portfolio entry to another portfolio? Right now it is just linking to a static page.

    Thanks

    #47283

    Hey,

    you can use custom fields to enter custom links. In template_portfolio.php replace:

    echo "<a href='".get_permalink()."' class='more-link'>".__('Read more','cleancut')."</a>";

    with:

    if (get_post_meta($post->ID, 'website', true) != ''){
    echo "<a href='".get_post_meta($post->ID, 'website', true)."' class='more-link'>".__('Go to Portfolio','cleancut')."</a>";
    }else{
    echo "<a href='".get_permalink()."' class='more-link'>".__('Read more','cleancut')."</a>";
    }

    Then create custom fields called “website” for each portfolio entry and enter the portfolio url you want to link to.

    #47284

    okay, I have looked through the wordpress codex to figure out where to create custom fields, but I do not see a place to enter it on the portfolio entry page. Could you direct me to where I create this?

    Thank you

    #47285

    I read this post which I believe is about a similar problem. However, I do not even have the option of custom field on portfolio entries. Any help is greatly greatly appreciated. http://www.kriesi.at/support/topic/read-more-and-portfolio-links

    #47286

    Sorry forgot to mention that :( -

    You need to modify the portfolio options to support custom fields. To do this, open /theme_options/portfolio.php and find this code (around line 59):

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'menu_position' => 5,
    'supports' => array('title','thumbnail','excerpt','editor','comments')
    );

    Change the supports to include custom fields like this:

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'menu_position' => 5,
    'supports' => array('title','thumbnail','excerpt','editor','comments','custom-fields')
    );

    #47287

    thanks, that worked perfectly to get the custom fields option, however, now I can’t seem to get any portfolio entries to show on the “sub” portfolio. When I click on an image in the main portfolio it just links to the generic page I created, not showing any portfolio entries.

    #47288

    and the link to that sub page still shows as: http://altd.dev.amermancreative.com/?portfolio=absolute-moon-youtube

    #47289

    okay so from what I can tell, under theme options I have actually directed the sub portfolio to show on the page: http://altd.dev.amermancreative.com/colts

    but the portfolio entry everyone clicks on takes it to that absolute-moon-youtube portfolio entry instead…ahhhh…. thanks for your help

    #47290

    Hey,

    you need to create portfolio pages for each horse race. Actually these pages aren’t sub portfolios but “standard” portfolios – sub portfolios aren’t supported at the moment. Then you create one portfolio where you enter the urls to the different horse race portfolio sites as custom fields for the portfolio entries. These entries will link to the other portfolio pages afterwards.

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

The topic ‘Linking a Portfolio Entry to Another Portfolio’ is closed to new replies.