U – Theme – theme fix

Tagged: 

This topic contains 7 replies, has 2 voices, and was last updated by  silico26 2 years, 2 months ago.

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

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

  • Author
    Posts
  • #7854

    silico26
    Participant

    Great plugin! The shortcodes for the listings overviews look great, but my theme isn’t cooperating with the individual page listings – they’re appearing full width and generally don’t look nice as you can with this example listing here:

    http://tinyurl.com/pyo9l5p

    I assume this has to do with the part of the documentation that mentions editing the archive.php and single.php files?

    If so, my theme’s archive.php and single.php files don’t seem to have the same reference text as the documentation mentions. I’m using the U-design theme. I’ve attached my PHP files here.

    Any reference to where I should add these codes from the documentation?

    single file: <?php do_action( 'epl_property_single' ); ?>
    archive file: <?php do_action( 'epl_property_blog' ); ?>

    Thanks

    • This topic was modified 2 years, 2 months ago by  silico26.
    • This topic was modified 2 years, 2 months ago by  Merv Barrett.
    Attachments:
    You must be logged in to view attached files.
    #7870

    Merv Barrett
    Keymaster

    Just use trial and error. Insert the function in the files and see where it appears

    In archive-listing.php place it after

    <?php while (have_posts()) : the_post(); ?>

    Then you can remove the unused code e.g.

    <?php while (have_posts()) : the_post(); ?>
         <?php do_action( 'epl_property_blog' ); ?>
    <?php endwhile; ?>

    In single-listing.php place it after

    <?php		if (have_posts()) :
    			while (have_posts()) : the_post(); ?>

    Then you can remove the unused code e.g.

    <?php	if (have_posts()) :
    	while (have_posts()) : the_post(); ?>
    		<?php do_action( 'epl_property_single' ); ?>
    		<?php comments_template();
    endwhile; else: ?>
    #7872

    Merv Barrett
    Keymaster

    moved topic to theme support

    #8247

    silico26
    Participant

    thanks, it looks like this worked. i didn’t comment anything out though, not sure if that’s required or just good practice to clean up the code?

    #8248

    silico26
    Participant

    i also tried to clean up the page by removing the author/property manager area below the map, which worked, but it’s also repeating my description/images for some reason. any insight?

    http://tinyurl.com/pyo9l5p

    content-listing-single.php file:

    <?php
    /*
     * Single Property Template: Expanded
     *
     * @package easy-property-listings
     * @subpackage Theme
     */
    ?>
    
    <div id="post-<?php the_ID(); ?>" <?php post_class( 'epl-listing-single epl-property-single view-expanded' ); ?>>
    	<div class="entry-header epl-header epl-clearfix">
    		<div class="title-meta-wrapper">
    			<div class="entry-col property-details">
    			
    				<?php do_action('epl_property_before_title'); ?>
    				<h1 class="entry-title">
    					<?php do_action('epl_property_title'); ?>
    				</h1>
    				<?php do_action('epl_property_after_title'); ?>
    				
    			</div>
    	
    			<div class="entry-col property-pricing-details">
    			
    				<?php do_action('epl_property_price_before'); ?>
    				<div class="property-meta pricing">
    					<?php do_action('epl_property_price'); ?>
    				</div>
    				<?php do_action('epl_property_price_after'); ?>
    				<div class="property-feature-icons epl-clearfix">
    					<?php do_action('epl_property_icons'); ?>				
    				</div>
    				
    			</div>
    		</div>
    	</div>
    
    	<div class="entry-content epl-content epl-clearfix">
    	
    		<?php do_action( 'epl_property_featured_image' ); ?>
    		
    		<?php do_action( 'epl_buttons_single_property' ); ?>
    
    		<div class="tab-wrapper">
    			<div class="epl-tab-section">
    				<h5 class="tab-title"><?php echo apply_filters('property_tab_title',__('Property Details', 'epl')); ?></h5>
    				<div class="tab-content">
    					<div class="tab-content property-details">
    						<h3 class="tab-address">
    							<?php do_action('epl_property_address'); ?>
    						</h3>
    						<?php do_action('epl_property_land_category'); ?>
    						<?php do_action('epl_property_price_content'); ?>
    						<?php do_action('epl_property_commercial_category'); ?>
    					</div>
    					<div class="property-meta">
    						<?php do_action('epl_property_available_dates');// meant for rent only ?>								
    						<?php do_action('epl_property_inspection_times'); ?>
    					</div>
    				</div>
    			</div>
    
    			<div class="epl-tab-section">
    				<h5 class="tab-title"><?php _e('Description', 'epl'); ?></h5>
    				<div class="tab-content">
    					<!-- heading -->
    					<h2 class="entry-title"><?php do_action('epl_property_heading'); ?></h2>
    			
    					<h3 class="secondary-heading"><?php do_action('epl_property_secondary_heading'); ?></h3>
    					<?php
    						do_action('epl_property_content_before');
    						
    						the_content();
    						
    						do_action('epl_property_content_after');
    					?>
    				</div>
    			</div>
    
    			<?php do_action('epl_property_tab_section_before'); ?>
    			<div class="epl-tab-section">
    					<?php do_action('epl_property_tab_section'); ?>
    			</div>
    			<?php do_action('epl_property_tab_section_after'); ?>
    			
    			<?php do_action( 'epl_property_gallery' ); ?>
    			
    			<?php do_action( 'epl_property_map' ); ?>
    			
    			<?php do_action( 'epl_single_extensions' ); ?>
    			
    			
    		</div>
    	</div>
    		</div>
    </div>
    <!-- end property -->
    
    • This reply was modified 2 years, 2 months ago by  silico26.
    #8295

    Merv Barrett
    Keymaster

    You can edit the single-listing.php file. The extra description and images are coming from that file and not the content-listing-single.php file.

    #8308

    silico26
    Participant

    @merv barrett thanks for pointing me in the right direction. i tried removing the code in my single-listing.php file as you suggested above in post #7170:

    <?php	if (have_posts()) :
    	while (have_posts()) : the_post(); ?>
    		<?php do_action( 'epl_property_single' ); ?>
    		<?php comments_template();
    endwhile; else: ?>

    is the third line a typo? why would you remove this line that you’ve just added?
    <?php do_action( 'epl_property_single' ); ?>

    i did some testing and when removing all of the code suggested (as well as just bits of it) it seems to trigger a white page of death.

    thanks

    #8357

    silico26
    Participant

    I have solved this, although I’m not even sure how… a lot of trial and error 🙂

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

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

The forum ‘Theme Support’ is closed to new topics and replies.