I would like to remove the pretty photo light box from front page.

Mystery Themes Support Themes Free Themes Fotogenic I would like to remove the pretty photo light box from front page.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17451
    glhs958
    Participant

    I would like to remove the pretty photo light box from the front page portfolio section.
    I would assume I would have to edit the code in mt-custom-hooks.php?
    if so what would be the correct line to remove? Also I am trying to implement this in a child theme so any help as to if I just copy edited file to child theme folder or add function in child themes functions.php

    
    if ( ! function_exists( 'fotogenic_homepage_portfolio_sec' ) ) :
    
    /*
     * Frontpage masonry section function
     *
     */
    
    function fotogenic_homepage_portfolio_sec() {
    
    	$fotogenic_cat_name = get_theme_mod( 'frontpage_portfolio_category_select_setting' );
    
    	if ( empty( $fotogenic_cat_name ) ) {
    		return;
    	}
    ?>
    
    	<!-- mt-fotogenic-masonry-section -->
    	<section class="mt-fotogenic-masonry-wrap">
    		<?php $fotogenic_portfolio_title = get_theme_mod( 'frontpage_portfolio_title_setting' ); 
    		if (  !empty ( $fotogenic_portfolio_title ) ) { ?>
    			<h2 class="section-title"><?php echo esc_html( $fotogenic_portfolio_title ); ?></h2>
    		<?php }
    
    		$frontpage_portfolio_sub_title_setting = get_theme_mod( 'frontpage_portfolio_sub_title_setting', '' );
    		if ( !empty( $frontpage_portfolio_sub_title_setting ) ) {
    			echo '<div class="section-sub-title">'.esc_html( $frontpage_portfolio_sub_title_setting ).'</div>';
    		} ?>
    
    		<div class="fotogenic_masonry_images">
    			<?php
    				$portfolio_count = apply_filters( 'fotogenic_portfolio_count', 9 );
    				$fotogenic_portfolio_posts = new WP_Query( array( 
    						'category_name' 	=> esc_attr( $fotogenic_cat_name ),
    						'posts_per_page' 	=> absint( $portfolio_count ),
    						'order_by' 			=> 'date',
    						'order' 			=> 'ASC'
    					)
    				);  
    
    				if ( $fotogenic_portfolio_posts -> have_posts() ) :
    					while( $fotogenic_portfolio_posts -> have_posts() ) : $fotogenic_portfolio_posts -> the_post(); ?>
    
    						<div class="masonry_item">
    							 <?php if ( get_the_post_thumbnail_url() != " " ) { ?>
    									<a href="<?php echo esc_url(get_the_post_thumbnail_url()); ?>" rel="prettyPhoto">
    										<img src="<?php echo esc_url(get_the_post_thumbnail_url()); ?>">
    									</a>
    									<div class="masonry-content-wrapper">
    										<h2 class="masonry_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    										<div class="masonary_excerpt"> <?php the_excerpt(); ?> </div>
    									</div> <!-- masonry-content-wrapper -->
    							<?php } ?>
    						</div>
    
    			<?php endwhile; wp_reset_postdata(); endif; ?>	
    
    		</div>
    		<?php 
    			$section_button_url = get_theme_mod( 'frontpage_portfolio_button_url_setting' ); 
    			$section_button_label = get_theme_mod( 'frontpage_portfolio_botton_label_setting' );
    			if ( !empty ( $section_button_label ) ) { ?>
    				<div class="masonary-view-all-btn">
    					<a class="hero_image_btn" href="<?php echo esc_url( $section_button_url ); ?>"><?php echo esc_html( $section_button_label ); ?></a>
    				</div>
    		<?php } ?>
    
    	</section>
    
    <?php }
    
    endif;
    #17453
    Mystery Themes
    Keymaster

    Hello there,

    If you want to remove pretty photo features from only the portfolio section, this way is better but if you want to remove prettyphoto features from all gallery sections then you can disable them from jquery as well without changing code in functions.

    PS: If you want to edit core code then better way to create a child theme and made customization. Which one is secure while you update the theme in the future.

    Thanks,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.