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

    I had a couple more questions / issues:

    1) How can I get a button to show up in the portfolio excerpt? I want to add a button that says “visit the site” and links to an external page in another window.

    2) In the portfolio page with one column, the slide controls aren’t showing up when I have multiple images. How can I add the scroll controls to the portfolio page?

    I tried adding to loop-portfolio.php on line 52:

    echo ‘<div class=”slidecontrolls” style=”visibility:visible; opacity:1 “>’;

    Which worked, but the unclosed <div> tag causes issues with the footer.

    #45046

    1) Replace following code to loop-portfolio.php:

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

    with:

    echo '<a class="more-link" href="'. get_permalink().'">'.__('Read more','avia_framework').'</a>';
    if (get_post_meta($post->ID, 'website', true) != ''){
    echo '<a class="more-link" href="'.get_post_meta($post->ID, 'website', true).'">'.__('Visit the site','avia_framework').'</a>';
    }

    Then add custom fields to your portfolio entries, name them “website” and enter the url to the website as value.

    2) I’ll report this to Kriesi. Maybe it’s a bug. I don’t think you can implement this easily without changing some files.

    #45047

    Thanks for the reply. Unfortunately, this adds the button to all of the portfolio pages. I only want to be able to add it to some of the portfolio posts. How can I get the excerpt section of the portfolio to accept short codes?

    #45048

    You don’t need shortcodes – the code I posted above should only display the website button if you set a custom field. I changed it a bit – please try it again.

    #45049

    hmm. Im not seeing the custom field option.

    #45050

    As of right now, its showing the button on all of my posts, regardless of meta data. http://redbottlecreative.redbottledev.com/work-design

    #45051

    Hey,

    In order to enable Custom Fields in the Portfolio section, this must first be added to the Custom Post Type options set when registering the Portfolio section.

    Open up /includes/admin/register-portfolio.php and find this code on line 31:

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

    Change it to:

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

    The Custom Fields box, by default, is hidden. You can enable it on the portfolio page by checking the “Screen Options” bo on the top right of the page and checking the custom fields box.

    The bug that the Visit The Site link appears on every post seems to be that the Read More text was replaced with Visit The Site; the links actually point to the Portfolio Items’ individual page.

    James

    #45052

    Hey James,

    You are the man. I got it up and working. Thank you so much!

    For all you brightbox users who read this post, here is the correct code that should replace:

    echo ‘‘.__(‘Read more’,’avia_framework’).’‘;

    Replace with:

    if (get_post_meta($post->ID, ‘website’, true) != ”){

    echo ‘ID, ‘website’, true).’”>’.__(‘Visit the site’,’avia_framework’).’‘;

    }

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

The topic ‘Portfolio Issues’ is closed to new replies.