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

    Hi!

    Thanks for the great theme!!

    I am building a site based in the portfolio option. In each portfolio item when you upload images for the slideshow the default option of each image is “Link to this post” at the “Apply link to the image?” field. Is it possible to have as default the “No link” option ? So I don’t have to go through each image and change it ?

    Regards,

    Penelope

    #133948

    Sure – open up wp-contentthemesflagshipincludesadminregister-admin-metabox.php and replace

    array(	"name" 	=> "Apply link to the image?",
    "desc" => "",
    "slug" => "media",
    "class" => "av_2columns av_col_1",
    "id" => "slideshow_link",
    "type" => "select",
    "std" => "self",
    "no_first" => "true",
    "subtype" => array('No link'=>'','Open Lightbox when clicked'=>'lightbox','Link to this Post'=>'self','Link to Page'=>'page','Link to Category'=>'cat','Link manually'=>'url'),

    ),

    with

    array(	"name" 	=> "Apply link to the image?",
    "desc" => "",
    "slug" => "media",
    "class" => "av_2columns av_col_1",
    "id" => "slideshow_link",
    "type" => "select",
    "std" => "",
    "no_first" => "true",
    "subtype" => array('No link'=>'','Open Lightbox when clicked'=>'lightbox','Link to this Post'=>'self','Link to Page'=>'page','Link to Category'=>'cat','Link manually'=>'url'),

    ),

    #133949

    Hi!

    Great ! thanks a lot Dude.

    I have another question please. I have made a custom field for my portfolio entries. I have put it in the functions.php of my template, and in the loop-portfolio-single.php file, so when I am viewing a single portfolio entry shows fine. How can I show this custom field when I am using ajax view of the portfolio items ?

    I have renamed a portfolio item to TEST (as my site is in greek) so you can see what I mean: http://www.walk-in-greece.com/ionia-nisia/kerkyra/

    and choose the TEST (first one of the portfolio items) it opens with ajax and the data from my custom field don’t show. If you open the same entry with no ajax it shows: http://www.walk-in-greece.com/proorismoi-item/stigmes-istoria-kerkyras/

    Thank you !

    Penelope

    #133950

    Hi Penelope,

    You would also need to add the custom field output to the function in functions-flagship.com which outputs the ajax portfolio item. Look for the start of it with:

    function avia_check_ajax_request()

    Regards,

    Devin

    #133951

    Hi Devin,

    Thanks for the reply. I am not sure I know the correct syntax in order to put it in functions-flagship.php. In the functions.php I added :

    // Get Custom Field Template Values

    function getCustomField($theField) {

    global $post;

    $block = get_post_meta($post->ID, $theField);

    if($block){

    foreach(($block) as $blocks) {

    echo $blocks;

    }

    }

    }

    and then in loop-portfolio-single.php file I added : <div> <?php getCustomField(‘extra_field’); ?></div>

    and worked OK. But I suppose its not the same syntax for the ajax portfolio ?

    Could you help me please ?

    Regards,

    Penelope

    #133952

    Look for:

    echo "<div class='entry-content'>";
    $meta = avia_portfolio_meta($id);
    if($meta)
    {

    echo $meta;
    echo avia_advanced_hr(false, 'hr_small');
    }

    the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> &rarr;</span>');
    echo "</div>";

    You can add it in either just before the portfolio meta data or after it so it comes just before the content. Eg:

    echo "<div class='entry-content'>";
    $meta = avia_portfolio_meta($id);
    if($meta)
    {

    echo $meta;
    echo avia_advanced_hr(false, 'hr_small');
    }
    getCustomField('extra_field');
    the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> &rarr;</span>');
    echo "</div>";

    #133953

    Hi Devin,

    Ok I got it, I think. I want my custom field to be after the content, and particularly below the slide show. I would have to do some css formating though is it correct ? right now it shows with no margin left – right.

    Thanks

    Penelope

    #133954

    You could put it just after the ending div and then wrap it in a new div and class just like the entry content is.

    #133955

    ok I will try that! Thanks so much for all of your help.

    Regards,

    Penelope

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

The topic ‘Portfolio items – slideshow default options for images’ is closed to new replies.