• Resolved JohnIMC

    (@johnimc)


    We have a few customers that sell land and ranches and have the need for a featured listing tool but do not need the typical Beds, Baths and Sq Ft fields to display. Can you set these fields not to display without editing the plug-in class files (archive-listing.php, class-featured-listings-widget.php, single-listing.php. They really do not want these fields to show up.

    <-CODE->

    if ( ” != get_post_meta( $post->ID, ‘_listing_bedrooms’, true ) || ” != get_post_meta( $post->ID, ‘_listing_bathrooms’, true ) || ” != get_post_meta( $post->ID, ‘_listing_sqft’, true )) {
    $loop .= sprintf( ‘<ul class=”listing-beds-baths-sqft”><li class=”beds”>%s<span>Beds</span> <li class=”baths”>%s<span>Baths</span> <li class=”sqft”>%s<span>Sq ft</span>‘, get_post_meta( $post->ID, ‘_listing_bedrooms’, true ), get_post_meta( $post->ID, ‘_listing_bathrooms’, true ), get_post_meta( $post->ID, ‘_listing_sqft’, true ) );
    }
    </-CODE->

    I am pretty sure I can customize these but if I do and the plug-in updates I believe it will wipe what has been customized?

    Any way to hide these fields from within the WordPress control panel?

    Thank you in advance for your help.

    https://www.ads-software.com/plugins/wp-listings/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author agentevolution

    (@agentevolution)

    You can add modified versions of the template files (single- and archive-listing.php) and add them to your theme folder so they will not be overwritten in an update. This will let you remove any data you don’t want.

    The widget (class-featured-listings-widget.php) doesn’t work this way, but everything has an HTML class and can be hidden with CSS by using display: none;

    Thread Starter JohnIMC

    (@johnimc)

    Thank you for the reply and the information. By placing the files in the theme folder will the plugin know to use these modified files or is this only for backing up the modified files?

    Plugin Author agentevolution

    (@agentevolution)

    The plugin will know to use those template files if they are in your theme folder. Again, this is only for the single-listing.php and archive-listing.php template files.

    I’m having issue that is similar. I want the contents of the fields to display if there is something in the field, however, if I don’t have anything in the CITY and STATE fields it still prints “CITY” & “ST” on the widget. What file has the code I can edit out the html that is causing this to appear?

    Plugin Author agentevolution

    (@agentevolution)

    This is not a similar issue and this topic has been marked resolved. Please post a new topic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing WP Listings Archive & Widget Display Fields’ is closed to new replies.