Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPSight

    (@wpsight)

    Hi cosmozara,

    If you want to display the price next to the title on single listing pages, you would need to apply a filter (also see Using Code Snippets):

    /**
     * Display price next to listing title
     */
    add_filter( 'wpsight_get_listing_title', 'wpsight_listing_title_price', 10, 3 );
    
    function wpsight_listing_title_price( $output, $post_id, $actions ) {
    
    	// Use global post ID if not defined
    
    	if ( ! $post_id )
    		$post_id = get_the_ID();
    
    	ob_start(); ?>
    
        <div class="wpsight-listing-title clearfix">
    
    	    <h1 class="entry-title">
    			<?php echo get_the_title( $post_id ); ?>
    			<?php wpsight_listing_price( $listing->ID, '(', ')' ); ?>
    		</h1>
    
    	    <?php wpsight_listing_actions( $post_id, $actions ); ?>
    
    	</div><?php
    
    	return ob_get_clean();
    
    }

    Then add some custom CSS (e.g. using Simple Custom CSS) to show the price inline:

    .entry-title .wpsight-listing-price { display: inline; font-size: 14px; font-weight: normal; }
    .entry-title .wpsight-listing-price .listing-price-symbol, .entry-title .wpsight-listing-price .listing-price-value { font-size: inherit }

    To show the title on listing archive pages you can edit the template file listing-archive-title.php:

    <div class="wpsight-listing-section wpsight-listing-section-title">
    
    	<?php do_action( 'wpsight_listing_archive_title_before' ); ?>
    
    	<div class="wpsight-listing-title">
    	    <?php the_title( sprintf( '<h2 class="entry-title">', esc_url( get_permalink() ) ), ' ' . wpsight_get_listing_price( $listing->ID, '(', ')' ) . '</h2>' ); ?>
    	</div>
    
    	<?php do_action( 'wpsight_listing_archive_title_after' ); ?>
    
    </div><!-- .wpsight-listing-section-title -->

    Also have a look at Using Templates to see how you can replace a WPCasa template using your theme.

    Hope this helps.

    Best regards,
    Simon [WPCasa]

    Thread Starter cosmozara

    (@cosmozara)

    Ty very much :D…..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing price position’ is closed to new replies.