change masonry

The support forum is open for members only. To add a topic or reply in the forum, please login or register.

Support Forum Moved
The Pojo Themes support has been transferred to a faster and more personal ticketing platform, so the forums are no longer active.
  • If you want to learn how to use Pojo themes, check out our extensive documentation guides.
  • Need help with using our themes? Contact us with a detailed explanation of your issue in the support page.
  • Have a pre-sale question or other inquiry? Feel free to contact us about it.

Support Forums Support (Legacy) change masonry

This topic is: Resolved

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1457

    tzafi azran
    Participant

    hello,
    a while ago i received help changing my masonry layout in Atlanta to have 4 columns.
    is there a way (i.e. content php file) that can enable me to have a layout for a masonry gallery similar to the theme “Superstar”?
    thanks for your help

    #1458

    Noa
    Keymaster

    Hello Tzafi,

    In Superstar the page is set as a full width galleries page.

    Are you referring to the spaces you have between the images on your site?

    What code exactly did you insert to set the 4 columns?

    #1541

    tzafi azran
    Participant

    i inserted the following php file into the child theme:

    <?php
    /**
     * Content: Gallery Masonry
     */
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $_pojo_parent_id;
    
    $categories       = '';
    $categories_terms = get_the_terms( null, 'pojo_gallery_cat' );
    if ( ! empty( $categories_terms ) && ! is_wp_error( $categories_terms ) )
    	$categories = wp_list_pluck( $categories_terms, 'name' );
    ?>
    
    <div id="post-<?php the_ID(); ?>" <?php post_class( apply_filters( 'pojo_post_classes', array( 'grid-item gallery-item masonry-item col-md-3 col-sm-6 col-xs-6' ), get_post_type() ) ); ?>>
    	<?php if ( $image_url = Pojo_Thumbnails::get_post_thumbnail_url( array( 'width' => '420', 'placeholder' => true ) ) ) : ?>
    		<figure class="image-link">
    			<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
    				<img src="<?php echo $image_url; ?>" alt="<?php echo esc_attr( get_the_title() ); ?>" class="media-object" />
    				<div class="overlay-image"></div>
    				<div class="caption overlay-title">
    					<h4 class="grid-heading">
    						<?php the_title(); ?>
    						<?php if ( ! empty( $categories ) ) : ?>
    							<small><?php echo implode( ', ', $categories ); ?></small>
    						<?php endif; ?>
    					</h4>
    				</div>
    			</a>
    		</figure>
    	<?php endif; ?>
    </div>
    #1556

    Boaz
    Keymaster
    This reply has been marked as private.
    #1557

    tzafi azran
    Participant

    Thank you very much for your response

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

The forum ‘Support (Legacy)’ is closed to new topics and replies.