Forum Replies Created

Viewing 15 replies - 46 through 60 (of 79 total)
  • Thread Starter onico0

    (@onico0)

    Update !

    To keep the native translation of EPL when you add custom categories with epl-filters, you have to use the WordPress syntaxes _e( & __( :

    <a href="/property/<?php echo str_replace(' ', '-', __( $property->get_property_category(), 'easy-property-listings' )); ?>"><?php _e( $property->get_property_category(), 'easy-property-listings' ); ?></a>

    Thread Starter onico0

    (@onico0)

    Sorry, my mistake. When I disable the CloudFlare minification of this site, the bug deasapered.

    Solved.

    Thread Starter onico0

    (@onico0)

    Just updated. Works like a charm. The only difference in frontend with my custom template is the “category of the property” leaved from the list of featured, which is a good thing. Thanks !

    Thanks, sure, documentation is very important for you users (I think main part of developers), but anybody can see you spent a lot of time on everything ! I would upgrade within 24h and give you my feedback. Perfect timing for me I will make a small script to import data from a french CRM (software) with JSon –> to EPL.
    Then (doing it now) I’m sure to be ready for the future with you.
    Long live 3.x !

    Just looked at the changelog and want to say : OMG ! ??

    Is it safe to upgrade any project / any custom template ?

    Thanks for all !

    Oh, nice ! glad it helped

    Thread Starter onico0

    (@onico0)

    Update.

    To display it in single template (/themes/XXXXX/easypropertylistings/content-listing-single.php) here the code.

    <?php
            $property_unique_id = get_post_meta( get_the_ID(), 'property_unique_id', true );
            echo $property_unique_id ;
    ?>

    Maybe disable Easy Fancy Box and install JetPack > Carousel ? It works for me.

    Thread Starter onico0

    (@onico0)

    And then, after created all pages (one per property-category), I will use this code in my custom /themes/xxx/easypropertylistings/loop-listing-blog-default.php

    <!-- Property Category -->
    <div class="property-category">
        <a href="/property/<?php echo str_replace(' ', '-', $property->get_property_category()); ?>"><?php echo $property->get_property_category(); ?></a>
    </div>

    Yes!

    Thread Starter onico0

    (@onico0)

    I think I got it ^_^

    category_key

    This example we are filtering listings by House
    [listing_category category_key="property_category" category_value="House"]
    src : https://codex.easypropertylistings.com.au/article/26-listingcategory

    Awesome plugin !

    Thread Starter onico0

    (@onico0)

    Sorry, what an easy (typical to WordPress) issue ^_^ (my bad).

    Here the code, simply use get_terms.

    (with foreach)

    <!-- Location -->
    <div class="property-location">
        <?php 
    
        $property_locations = get_terms('location'); 
    
        if ( ! empty( $property_locations ) && ! is_wp_error( $property_locations ) ) {
            $count = count( $property_locations );
            $i = 0;
            $term_list = '<p class="property-location">';
            foreach ( $property_locations as $property_location ) {
                $i++;
                $term_list .= '<a href="' . esc_url( get_term_link( $property_location ) ) . '">' . $property_location->name . '</a>';
                if ( $count != $i ) {
                    $term_list .= ' &middot; ';
                }
                else {
                    $term_list .= '</p>';
                }
            }
            echo $term_list;
        }
    
        ?>
    </div>
    Thread Starter onico0

    (@onico0)

    Oh very nice, I didn’t find this way to do (didn’t know about parameters in do_action, my bad) , good to know, thanks !

    Thread Starter onico0

    (@onico0)

    Here the template “single page for property” modified to work with the “slidingbar-widget-2” as custom sidebar

    /themes/Avada/single-listing.php

    of course after you have to customize it yourself

    <?php get_header(); ?>
    	<?php
    	$content_css = 'width:100%';
    	$sidebar_css = 'display:none';
    	$content_class = '';
    	$sidebar_exists = false;
    	$sidebar_left = '';
    	$double_sidebars = false;
    
    	$sidebar_1 = get_post_meta( $post->ID, 'sbg_selected_sidebar_replacement', true );
    	$sidebar_2 = get_post_meta( $post->ID, 'sbg_selected_sidebar_2_replacement', true );
    
    	if( $smof_data['posts_global_sidebar'] ) {
    		if( $smof_data['posts_sidebar'] != 'None' ) {
    			$sidebar_1 = array( $smof_data['posts_sidebar'] );
    		} else {
    			$sidebar_1 = '';
    		}
    
    		if( $smof_data['posts_sidebar_2'] != 'None' ) {
    			$sidebar_2 = array( $smof_data['posts_sidebar_2'] );
    		} else {
    			$sidebar_2 = '';
    		}
    	}
    
    	if( ( is_array( $sidebar_1 ) && ( $sidebar_1[0] || $sidebar_1[0] === '0' ) ) && ( is_array( $sidebar_2 ) && ( $sidebar_2[0] || $sidebar_2[0] === '0' ) ) ) {
    		$double_sidebars = true;
    	}
    
    	if( is_array( $sidebar_1 ) &&
    		( $sidebar_1[0] || $sidebar_1[0] === '0' )
    	) {
    		$sidebar_exists = true;
    	} else {
    		$sidebar_exists = false;
    	}
    
    	if( ! $sidebar_exists ) {
    		$content_css = 'width:100%';
    		$sidebar_css = 'display:none';
    		$sidebar_exists = false;
    	} elseif(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'left') {
    		$content_css = 'float:right;';
    		$sidebar_css = 'float:left;';
    		$content_class = 'portfolio-one-sidebar';
    		$sidebar_exists = true;
    		$sidebar_left = 1;
    	} elseif(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'right') {
    		$content_css = 'float:left;';
    		$sidebar_css = 'float:right;';
    		$content_class = 'portfolio-one-sidebar';
    		$sidebar_exists = true;
    	} elseif(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'default' || ! metadata_exists( 'post', $post->ID, 'pyre_sidebar_position' )) {
    		$content_class = 'portfolio-one-sidebar';
    		if($smof_data['blog_sidebar_position'] == 'Left') {
    			$content_css = 'float:right;';
    			$sidebar_css = 'float:left;';
    			$sidebar_exists = true;
    			$sidebar_left = 1;
    		} elseif($smof_data['blog_sidebar_position'] == 'Right') {
    			$content_css = 'float:left;';
    			$sidebar_css = 'float:right;';
    			$sidebar_exists = true;
    			$sidebar_left = 2;
    		}
    	}
    
    	if(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'right') {
    		$sidebar_left = 2;
    	}
    
    	if( $smof_data['posts_global_sidebar'] ) {
    		if( $smof_data['posts_sidebar'] != 'None' ) {
    			$sidebar_1 = $smof_data['posts_sidebar'];
    
    			if( $smof_data['blog_sidebar_position'] == 'Right' ) {
    				$content_css = 'float:left;';
    				$sidebar_css = 'float:right;';
    				$sidebar_left = 2;
    			} else {
    				$content_css = 'float:right;';
    				$sidebar_css = 'float:left;';
    				$sidebar_left = 1;
    			}
    		}
    
    		if( $smof_data['posts_sidebar_2'] != 'None' ) {
    			$sidebar_2 = $smof_data['posts_sidebar_2'];
    		}
    
    		if( $smof_data['posts_sidebar'] != 'None' && $smof_data['posts_sidebar_2'] != 'None' ) {
    			$double_sidebars = true;
    		}
    	} else {
    		$sidebar_1 = '0';
    		$sidebar_2 = '0';
    	}
    
    	if($double_sidebars == true) {
    		$content_css = 'float:left;';
    		$sidebar_css = 'float:left;';
    		$sidebar_2_css = 'float:left;';
    	} else {
    		$sidebar_left = 1;
    	}
    	?>
    	<div id="content" class="<?php echo $content_class; ?>" style="<?php echo $content_css; ?>">
    		<?php if( ( ! $smof_data['blog_pn_nav'] && get_post_meta($post->ID, 'pyre_post_pagination', true) != 'no' ) ||
    				  ( $smof_data['blog_pn_nav'] && get_post_meta($post->ID, 'pyre_post_pagination', true) == 'yes' ) ): ?>
    		<div class="single-navigation clearfix">
    			<?php previous_post_link('%link', __('Previous', 'Avada')); ?>
    			<?php next_post_link('%link', __('Next', 'Avada')); ?>
    		</div>
    		<?php endif; ?>
    		<?php if(have_posts()): the_post(); ?>
                    <?php
                    if (function_exists('epl_property_single')){
                    echo epl_property_single();
                    }
                    ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?> style="display:none;">
    			<?php
    			global $smof_data;
    			$full_image = '';
    			if( ! post_password_required($post->ID) ): // 1
    			if($smof_data['featured_images_single']): // 2
    			if( avada_number_of_featured_images() > 0 || get_post_meta( $post->ID, 'pyre_video', true ) ): // 3
    			?>
    			<div class="fusion-flexslider flexslider post-slideshow">
    				<ul class="slides">
    					<?php if(get_post_meta($post->ID, 'pyre_video', true)): ?>
    					<li>
    						<div class="full-video">
    							<?php echo get_post_meta($post->ID, 'pyre_video', true); ?>
    						</div>
    					</li>
    					<?php endif; ?>
    					<?php if( has_post_thumbnail() && get_post_meta( $post->ID, 'pyre_show_first_featured_image', true ) != 'yes' ): ?>
    					<?php $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
    					<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
    					<?php $attachment_data = wp_get_attachment_metadata(get_post_thumbnail_id()); ?>
    					<li>
    						<?php if( ! $smof_data['status_lightbox'] && ! $smof_data['status_lightbox_single'] ): ?>
    						<a href="<?php echo $full_image[0]; ?>" rel="prettyPhoto[gallery<?php the_ID(); ?>]" title="<?php echo get_post_field('post_excerpt', get_post_thumbnail_id()); ?>"><img src="<?php echo $attachment_image[0]; ?>" alt="<?php echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true); ?>" /></a>
    						<?php else: ?>
    						<img src="<?php echo $attachment_image[0]; ?>" alt="<?php echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true); ?>" />
    						<?php endif; ?>
    					</li>
    					<?php endif; ?>
    					<?php
    					$i = 2;
    					while($i <= $smof_data['posts_slideshow_number']):
    					$attachment_new_id = kd_mfi_get_featured_image_id('featured-image-'.$i, 'post');
    					if($attachment_new_id):
    					?>
    					<?php $attachment_image = wp_get_attachment_image_src($attachment_new_id, 'full'); ?>
    					<?php $full_image = wp_get_attachment_image_src($attachment_new_id, 'full'); ?>
    					<?php $attachment_data = wp_get_attachment_metadata($attachment_new_id); ?>
    					<li>
    						<?php if( ! $smof_data['status_lightbox'] && ! $smof_data['status_lightbox_single'] ): ?>
    						<a href="<?php echo $full_image[0]; ?>" rel="prettyPhoto[gallery<?php the_ID(); ?>]" title="<?php echo get_post_field('post_excerpt', $attachment_new_id); ?>"><img src="<?php echo $attachment_image[0]; ?>" alt="<?php echo get_post_meta($attachment_new_id, '_wp_attachment_image_alt', true); ?>" /></a>
    						<?php else: ?>
    						<img src="<?php echo $attachment_image[0]; ?>" alt="<?php echo get_post_meta($attachment_new_id, '_wp_attachment_image_alt', true); ?>" />
    						<?php endif; ?>
    					</li>
    					<?php endif; $i++; endwhile; ?>
    				</ul>
    			</div>
    			<?php endif; // 3 ?>
    			<?php endif; // 2 ?>
    			<?php endif; // 1 ?>
    			<?php if($smof_data['blog_post_title']): ?>
    			<h2<?php if( ! $smof_data['disable_date_rich_snippet_pages'] ) { echo ' class="entry-title"'; } ?>><?php the_title(); ?></h2>
    			<?php elseif( ! $smof_data['disable_date_rich_snippet_pages'] ): ?>
    			<span class="entry-title" style="display: none;"><?php the_title(); ?></span>
    			<?php endif; ?>
    			<div class="post-content">
    				<?php the_content(); ?>
    				<?php avada_link_pages(); ?>
    			</div>
    			<?php if( ! post_password_required($post->ID) ): ?>
    			<?php echo avada_render_post_metadata( 'single' ); ?>
    			<?php if( ( $smof_data['social_sharing_box'] && get_post_meta($post->ID, 'pyre_share_box', true) != 'no' ) ||
    					  ( ! $smof_data['social_sharing_box'] && get_post_meta($post->ID, 'pyre_share_box', true) == 'yes' ) ):
    				$full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
    				$sharingbox_soical_icon_options = array (
    					'sharingbox'		=> 'yes',
    					'icon_colors' 		=> $smof_data['sharing_social_links_icon_color'],
    					'box_colors' 		=> $smof_data['sharing_social_links_box_color'],
    					'icon_boxed' 		=> $smof_data['sharing_social_links_boxed'],
    					'icon_boxed_radius' => $smof_data['sharing_social_links_boxed_radius'],
    					'tooltip_placement'	=> $smof_data['sharing_social_links_tooltip_placement'],
                    	'linktarget'        => $smof_data['social_icons_new'],
    					'title'				=> wp_strip_all_tags(get_the_title( $post->ID ), true),
    					'description'		=> wp_strip_all_tags(get_the_title( $post->ID ), true),
    					'link'				=> get_permalink( $post->ID ),
    					'pinterest_image'	=> ($full_image) ? $full_image[0] : '',
    				);
    				?>
    				<div class="fusion-sharing-box share-box">
    					<h4><?php echo __('Share This Story, Choose Your Platform!', 'Avada'); ?></h4>
    					<?php echo $social_icons->render_social_icons( $sharingbox_soical_icon_options ); ?>
    				</div>
    			<?php endif; ?>
    			<?php if( ( $smof_data['author_info'] && get_post_meta($post->ID, 'pyre_author_info', true) != 'no' ) ||
    					  ( ! $smof_data['author_info'] && get_post_meta($post->ID, 'pyre_author_info', true) == 'yes' ) ): ?>
    			<div class="about-author">
    				<div class="fusion-title title"><h2 class="title-heading-left"><?php echo __('About the Author:', 'Avada'); ?> <?php the_author_posts_link(); ?></h2><div class="title-sep-container"><div class="title-sep sep-double"></div></div></div>
    				<div class="about-author-container">
    					<div class="avatar">
    						<?php echo get_avatar(get_the_author_meta('email'), '72'); ?>
    					</div>
    					<div class="description">
    						<?php the_author_meta("description"); ?>
    					</div>
    				</div>
    			</div>
    			<?php endif; ?>
    
    			<?php if( ( $smof_data['related_posts'] && get_post_meta($post->ID, 'pyre_related_posts', true ) != 'no' ) ||
    					  ( ! $smof_data['related_posts'] && get_post_meta($post->ID, 'pyre_related_posts', true) == 'yes' ) ): ?>
    			<?php $related = fusion_get_related_posts($post->ID, $smof_data['number_related_posts']); ?>
    			<?php if($related->have_posts()): ?>
    			<div class="related-posts single-related-posts">
    				<div class="fusion-title title"><h2 class="title-heading-left"><?php echo __('Related Posts', 'Avada'); ?></h2><div class="title-sep-container"><div class="title-sep sep-double"></div></div></div>
    				<div id="carousel" class="es-carousel-wrapper fusion-carousel-large">
    					<div class="es-carousel">
    						<ul>
    							<?php while($related->have_posts()): $related->the_post(); ?>
    							<?php if(has_post_thumbnail()): ?>
    							<li>
    								<div class="image" aria-haspopup="true">
    									<?php if($smof_data['image_rollover']): ?>
    									<?php the_post_thumbnail('related-img'); ?>
    									<?php else: ?>
    									<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('related-img'); ?></a>
    									<?php endif; ?>
    									<?php
    									if(get_post_meta($post->ID, 'pyre_image_rollover_icons', true) == 'link') {
    										$link_icon_css = 'display:inline-block;';
    										$zoom_icon_css = 'display:none;';
    									} elseif(get_post_meta($post->ID, 'pyre_image_rollover_icons', true) == 'zoom') {
    										$link_icon_css = 'display:none;';
    										$zoom_icon_css = 'display:inline-block;';
    									} elseif(get_post_meta($post->ID, 'pyre_image_rollover_icons', true) == 'no') {
    										$link_icon_css = 'display:none;';
    										$zoom_icon_css = 'display:none;';
    									} else {
    										$link_icon_css = 'display:inline-block;';
    										$zoom_icon_css = 'display:inline-block;';
    									}
    
    									$icon_url_check = get_post_meta(get_the_ID(), 'pyre_link_icon_url', true); if(!empty($icon_url_check)) {
    										$icon_permalink = get_post_meta($post->ID, 'pyre_link_icon_url', true);
    									} else {
    										$icon_permalink = get_permalink($post->ID);
    									}
    									?>
    									<div class="image-extras">
    										<div class="image-extras-content">
    											<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); ?>
    											<a style="<?php echo $link_icon_css; ?>" class="icon link-icon" href="<?php echo $icon_permalink; ?>">Permalink</a>
    											<?php
    											if(get_post_meta($post->ID, 'pyre_video_url', true)) {
    												$full_image[0] = get_post_meta($post->ID, 'pyre_video_url', true);
    											}
    											?>
    											<a style="<?php echo $zoom_icon_css; ?>" class="icon gallery-icon" href="<?php echo $full_image[0]; ?>" rel="prettyPhoto[gallery]">Gallery</a>
    											<h3><a href="<?php echo $icon_permalink; ?>"><?php the_title(); ?></a></h3>
    										</div>
    									</div>
    								</div>
    							</li>
    							<?php endif; endwhile; ?>
    						</ul>
    					</div>
    					<div class="es-nav"><span class="es-nav-prev"></span><span class="es-nav-next"></span></div>
    				</div>
    			</div>
    			<?php wp_reset_postdata(); endif; ?>
    			<?php endif; ?>
    			<?php if( ( $smof_data['blog_comments'] && get_post_meta($post->ID, 'pyre_post_comments', true ) != 'no' ) ||
    					  ( ! $smof_data['blog_comments'] && get_post_meta($post->ID, 'pyre_post_comments', true) == 'yes' ) ): ?>
    				<?php
    				wp_reset_query();
    				comments_template();
    				?>
    			<?php endif; ?>
    			<?php endif; ?>
    		</div>
    		<?php endif; ?>
    	</div>
    	<?php
        $sidebar_1 = 'slidingbar-widget-2'; // / ! \ quick set of  Slidingbar Widget 2 as right sidebar
        if( $sidebar_exists == true ): ?>
    	<?php wp_reset_query(); ?>
    	<div id="sidebar" class="sidebar" style="<?php echo $sidebar_css; ?>">
    		<?php
    		if($sidebar_left == 1) {
    			generated_dynamic_sidebar($sidebar_1);
    		}
    		if($sidebar_left == 2) {
    			generated_dynamic_sidebar_2($sidebar_2);
    		}
    		?>
    	</div>
    	<?php if( $double_sidebars == true ): ?>
    	<div id="sidebar-2" class="sidebar" style="<?php echo $sidebar_2_css; ?>">
    		<?php
    		if($sidebar_left == 1) {
    			generated_dynamic_sidebar_2($sidebar_2);
    		}
    		if($sidebar_left == 2) {
    			generated_dynamic_sidebar($sidebar_1);
    		}
    		?>
    	</div>
    	<?php endif; ?>
    	<?php endif; ?>
    <?php get_footer(); ?>
    Thread Starter onico0

    (@onico0)

    You right, it’s a very famous theme. Anyway, I share here my tests with the last version Avada 3.9.

    For my next tests, I plane to use Divi from ElegantTheme, is this problem also happen with it ? Which one is the easier to template for you, Divi or Avada ?

Viewing 15 replies - 46 through 60 (of 79 total)