Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #572589

    Hi Kriesi Team,

    I was hoping you could help me out with two things. I’ve included two links below, one to a blog page and one to a portfolio page.

    For the Portfolio page is there a way to make the portfolio grid on the bottom not display the portfolio piece that has been selected?

    For the blog, is there a way to crop or stretch the featured image for the thumbnails so that every image is uniform? Like for the masonry gallery.

    Many thanks,
    DI.

    #573531

    Hey dialedinmarketing!

    Thank you for using Enfold.

    1.) Did you use the advance layout builder to create the portfolio item? Try to add this in the functions.php file:

    function ava_exclude_portfolio($query) {
    	$type = get_post_type();
    	if ('portfolio' == $type) {
    		$query->set( 'offset', '1' );
    	}
    }
    add_action('pre_get_posts', 'ava_exclude_portfolio');

    2.) The better solution is to upload images with the same size and proportion for each posts to keep the grid consistent. Another solution is to use this css code:

    .avia-content-slider .slide-image, .avia-content-slider .slide-image img {
        width: 100%;
    }

    Regards,
    Ismael

    #576211

    Hi Ismael,

    Yes, I did use the advance layout editor in order to create each portfolio item. I added the code into the functions.php file but all it did was remove the main image from the easy slider rather than hiding the item below.

    The second piece of code for for the image proportions worked great though!

    Thanks.

    #578356

    Hey!

    The first code should not affect the images so not sure why that happened. Could you please post the login details here? We would like to do a little test.

    Regards,
    Ismael

    #581777

    Hi Isamel.

    Credientials are listed below.

    #584001

    Hi!

    We replaced the function with the following:

    //portfolio query
    add_filter( 'avia_post_grid_query', 'custom_post_grid_query', 10, 2);
    function custom_post_grid_query( $query, $params ) {
    	$id = get_the_ID();
    	$query['post__not_in'] = array($id);
    	return $query;
    }

    It is working now.

    Regards,
    Ismael

    #584269

    Thanks, Ismael. That’s perfect. Please close this ticket.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Blog Thumbnails and Portfolio Grid’ is closed to new replies.