Add Extra Field To AgentPress Featured Listings Widget

The code in side this download folder enables you to add extra custom fields to the AgentPress Listings widget via the safety of your child theme.

Here’s a new field added for the Property Name displayed before the price for each listing output using the Featured Listings widget in AgentPress Pro :

AgentPress Listings Widget

You can use this code to position extra fields anywhere in the listing :

Add custom field AgentPress listings widget

Demo Video #

Shows the Name field added to the AgentPress Pro themes Property details on the Edit Listings screen and displayed using the AgentPress listings widget on the featured listings section of the AgentPress Pro themes front page.

Installation Steps #

There’s only 1 step :

Copy & paste the PHP code from the functions.php file ( excluding the opening PHP tag ) to the end of the AgentPress Pro themes functions file.

Download Folder


Comments

5 responses to “Add Extra Field To AgentPress Featured Listings Widget”

  1. Lisa Cerezo Avatar
    Lisa Cerezo

    This works beautifully for my main listings page. However, my search results pages don’t adopt the new format. Did I miss something?

    1. Link to your search results page. Are you using the featured listings widget on the results page? It only works in widget areas where you use it.

      1. Lisa Cerezo Avatar
        Lisa Cerezo

        Oh, that makes sense. Because my search results page looks just like the default listings page. So, I would add the same code to the search.php page?

        1. No, that won’t work. You would need a custom search template with different code because the widget is not coded the same as the search results. The code actually filters the widget function and your search page doesn’t use the same function as the widget. Did you want me to code that for you?

          1. Lisa Cerezo Avatar
            Lisa Cerezo

            If you could, that would be amazing!

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.