Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #217104

    Hi all,

    I have been working with Enfold for a number of sites now and never actually needed this forum :) However I have one now where I want something special. I am not sure if a support forum is the place to be as its more like a customization of the masonry portfolio.

    So whats the deal?

    Its possible to show title and excerpt on the hover panel of the items in the masonry, however I would like to show an image there. I was able to do this by setting it to excerpt, and add <img src=” etc to the excerpt. Looks pretty ok, only now ofcourse in the search results the image is shown aswell, and probably will on other areas of the site at some point.

    Here is a screenie of the work in progress: http://www.borkent.com/screenie.jpg

    I have a custom metabox setup in the portfolio admin to add the image needed for the figcaption hover panel, and I found the code in masonry_entries.php “<div class=’av-masonry-entry-content entry-content’ {$markup}>{$content}</div>” but somehow I just cant get the image to show correctly, it either breaks entirely or shows multiple instances of the src url.

    If anybody can tell me how to squeeze in this custom metabox entry without it duplicating zillions of times etc etc I would be very greatfull! Or maybe there is a way to use a function to insert something there?

    Kind regards and thanks for awesome themes!

    Thomas

    ps. just clicked my link and I see it opens in the lightbox, this is the same lightbox as on the enfold template and it has some css bug. Here is a css fix for it.

    problem: http://www.borkent.com/screenie_lightbox_kriesi.jpg
    fix:

    @media only screen and (max-width: 767px)
    {.pp_details {
    height: 50px!important;
    width: 100%!important;
    }}

    div.pp_default div.pp_content_container .pp_details {
    margin-top: 5px;
    }

    I also noticed I had to change some stuff to get logos working correctly in responive mode, I fix it with this:
    @media only screen and (max-width: 767px){
    .responsive .logo img {
    margin: 0 auto;
    max-height: 80px!important;
    }

    #217112

    Hi borkent!

    Open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_entries.php and replace

    
    				if(empty($this->loop[$key]['content']))
    				{
    					$this->loop[$key]['content'] 	= avia_backend_truncate($entry->post_content, apply_filters( 'avf_masonry_excerpt_length' , 60) , apply_filters( 'avf_masonry_excerpt_delimiter' , " "), "…", true, '');
    				}
    

    with

    
    				if(empty($this->loop[$key]['content']))
    				{
    					$this->loop[$key]['content'] 	= avia_backend_truncate($entry->post_content, apply_filters( 'avf_masonry_excerpt_length' , 60) , apply_filters( 'avf_masonry_excerpt_delimiter' , " "), "…", true, '');
    				}
    
    $this->loop[$key]['content'] = '<img src="my-image.jpg" />';
    

    and instead of my-image.jpg insert the url path to your preview image. If you want to use a meta box you can use the get_post_meta function: http://codex.wordpress.org/Function_Reference/get_post_meta to fetch the meta field data. Use it like

    
    				if(empty($this->loop[$key]['content']))
    				{
    					$this->loop[$key]['content'] 	= avia_backend_truncate($entry->post_content, apply_filters( 'avf_masonry_excerpt_length' , 60) , apply_filters( 'avf_masonry_excerpt_delimiter' , " "), "…", true, '');
    				}
    
    $prev_img = get_post_meta($id, 'my_custom_field_name');
    if($prev_img) $this->loop[$key]['content'] = $prev_img;
    

    Regards,
    Peter

    #217114

    Hey Dude, thanks for you swift reply! And with a super answer, gonna set it up with get_post_meta indeed!
    thx for leading me in the right direction!

    I added some Enfold related things in the ps, in case you missed it! check it out :)

    cheers,
    Thomas

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Need help on masonry portfolio hover "figcaption"’ is closed to new replies.