• 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

AgentPress – How to have Listings Title appear in Archive Listings

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 › General Discussion › AgentPress – How to have Listings Title appear in Archive Listings

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 9 years, 7 months ago by Susan.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • June 12, 2013 at 8:55 am #45458
    Helen
    Member

    Hi, The site I am working on is http://robinleechrealestate.com/ and I'm using AgentPress... I need to have the Listings title and Web Ref # appear  above 'View Listing' on the Home page and in the Residential etc. sections which are archive listings... I've looked at archive-listing.php and found some loop code, but also found the same code in functions.php and in taxonomy.php.  Has anyone done something like this?  Where do I make the addition?

    For example, on the Home page, the middle property in the first row is called  Indian Lake-Lakefront Home, so under the image, I need to have
    Indian Lake-Lakefront Home

    Web Ref #: 13-06

    Sharon, CT

    View Listing

    This is the code which seems to apply:
    if ( have_posts() ) : while ( have_posts() ) : the_post();

    $loop = ''; // init

    $loop .= sprintf( '<a href="%s">%s</a>', get_permalink(), genesis_get_image( array( 'size' => 'properties' ) ) );

    $loop .= sprintf( '<span class="listing-price">%s</span>', genesis_get_custom_field( '_listing_price' ) );
    $loop .= ( $meta = genesis_get_custom_field( '_listing_text' ) ) ? sprintf( '<span class="listing-text">%s</span>', $meta ) : '';
    $loop .= sprintf( '<span class="listing-address">%s</span>', genesis_get_custom_field( '_listing_address' ) );
    $loop .= sprintf( '<span class="listing-city-state-zip">%s, %s %s</span>', genesis_get_custom_field( '_listing_city' ), genesis_get_custom_field( '_listing_state' ), genesis_get_custom_field('_listing_zip' ) );

    $loop .= sprintf( '<a href="%s" class="more-link">%s</a>', get_permalink(), __( 'View Listing', 'agentpress' ) );

    $toggle = $toggle == 'left' ? 'right' : 'left';

    /** wrap in post class div, and output **/
    printf( '<div class="%s"><div class="widget-wrap"><div class="listing-wrap">%s</div></div></div>', join( ' ', get_post_class( $toggle ) ), $loop );

    endwhile; genesis_posts_nav(); endif;

    }

    http://robinleechrealestate.com/
    August 20, 2013 at 6:34 pm #57810
    Susan
    Moderator

    Helen: I'm just following up on unanswered posts; since it's been a while since you submitted this post, I'm hoping your issue has been resolved. If it hasn't, please check in, and I'll escalate this for you.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ 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

© 2023 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