• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Agent Press Custom Listing Archives

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Agent Press Custom Listing Archives

This topic is: not resolved

Tagged: Agentpress, winning agent

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 10 months ago by Susan.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 10, 2014 at 1:23 pm #94194
    BenNieIV
    Member

    Hello,

    We are using the Winning Agent theme and are wanting to customize the listing to display the meta data rather than an excerpt.

    I created a custom archive page for the Listings. The issue I am running into is when searching a taxonomy (4 Bedrooms) it returns the correct properties (4 Bedroom Properties) at the top of the results but then returns the rest of the properties (2, 3, etc Bedrooms) following.

    I'm guessing I have an error with the query somewhere but not sure. Any help is much appreciated! The code below...

    <?php
    
    /**
     * Template Name: Listing Archives
     * Description: Used as a page template to show page contents, followed by a loop through a CPT archive  
     */
    
    remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
    add_action( 'genesis_loop', 'agency_listing_archive_loop' ); // Add custom loop
    
    function agency_listing_archive_loop() {  
      	
    	// Intro Text (from page content)
    	echo '<div class="page hentry entry">';
    	echo '<h1 class="entry-title">'. get_the_title() .'</h1>';
    	echo '<div class="entry-content">' . get_the_content() ;
    
    	$args = array(
    		'post_type' => 'listing', // enter your custom post type
    		'orderby' => 'menu_order',
    		'order' => 'ASC',
    		'posts_per_page'=> '12',  // overrides posts per page in theme settings
    	);
    	$loop = new WP_Query( $args );
    	if( $loop->have_posts() ):
    				
    		while( $loop->have_posts() ): $loop->the_post(); global $post;
    
    		echo '<div id="listings">';
    			echo '<div class="one-fourth first">';
    			echo '<div class="pic">'. get_the_post_thumbnail( $id, array(150,150) ).'</div>';
    			echo '</div>';	
    			echo '<div class="three-fourths" style="border-bottom:1px solid #DDD;">';
    			echo '<h3>' . get_the_title() . '</h3>';	
    			echo '<div style="margin-top:20px;line-height:20px;text-align:right;">'.genesis_get_custom_field( '_listing_price' ).'<br />'.genesis_get_custom_field( '_listing_city' ).'</div>';
    			echo '</div>';
    		echo '</div>';
    		
    		endwhile;
    		
    	endif;
    	
    	echo '</div><!-- end .entry-content -->';
    	echo '</div><!-- end .page .hentry .entry -->';
    }
    	
    /** Remove Post Info */
    remove_action('genesis_before_post_content','genesis_post_info');
    remove_action('genesis_after_post_content','genesis_post_meta');
     
    genesis();
    http://dev.marketing.engagemobile.com/hearthside/tiffany/?s=&post_type=listing&homes=&bedroom=&master-bedroom-location=&bathrooms=&garage=
    April 17, 2014 at 2:21 pm #101041
    Susan
    Moderator

    As you posted this a while ago, I hope your issue has been resolved. If not, report back to me, and I will investigate further (or escalate as appropriate).

    If your issue has been resolved, please mark it "resolved", so that it can be closed.

    Thanks!

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble