Skip Navigation

[Resolved] How to change the home page and add icons in the Real Estate Site

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to make the home page of the Real Estate Reference Site display Apartment search instead of House search. I would also like to display a Font Awesome icon next to the "bedrooms" field displayed in search results.

Solution: You must go to Toolset > Layouts and change the usage of the Houses Layout to deselect "Blog/Home". Then you would clone the Apartments Archive Layout and replace the WordPress Archive cell with a custom search View, similar to the one in the Houses Archive Layout. The reason you cannot use the Apartments Layout itself here is that it includes a WordPress Archive cell, which is not designed to be used on the main Apartments archive.

To show a Font Awesome icon, add the classes "fa fa-bed" to the "i" tag just before the types field, like this:

<span class="property-detail" title="Number of Bedrooms">
        <i class="text-primary fa fa-bed"></i> 
        [types field="property-bedrooms" format="FIELD_VALUE"][/types]
      </span>
This support ticket is created 3 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by sharonA 3 years, 1 month ago.

Assigned support staff: Christian Cox.

Author
Posts
#1310571

Tell us what you are trying to do? 1. I want the site title to link to apartments and not to houses.

I understand that this is hard coded. I believe here: <li id="menu-item-917" class="menu-item menu-item-type-post_type_archive menu-item-object-house menu-item-917"><a href="hidden link" class="menu-link"><span class="text-wrap">Houses</span></a>

Is there any documentation that you are following? i saw this thread: https://toolset.com/forums/topic/real-estate-menu-does-not-update-to-layout-use-changes/ but I don't see where I can make this change.

2. how can i add the font awesome icons for the bedrooms; baths etc.

Is there a similar example that we can see?

What is the link to your site? hidden link

#1310579

Hi, I'm not quite clear I understand what you want to achieve. You mentioned making the site title link point to Apartments, then you shared some code for the "Houses" main menu link. If you want to manage the main menu links like "Houses", "Apartments", "Land", "Offices", and "Map Search", you can go to Appearance > Menus and select the "Top Menu" to edit. Then you can manipulate each link here as needed. You can add or remove items, including custom links, and change the text labels. Changing the actual markup produced by WordPress and your theme would require PHP development of a child theme. More about WordPress menus: https://codex.wordpress.org/WordPress_Menu_User_Guide

2. how can i add the font awesome icons for the bedrooms; baths etc.
Where exactly would you like to add icons - in the main menu, or in the individual listing pages, in the search results, or somewhere else?
In general you can use the Font Awesome icon tags to display icons, for instance a search icon:

<i class="fa fa-search"></i>
#1310585

Hi Christian,

Thanks for your quick reply. Trying to clarify. My question is just to ask how to change the site icon, site title link to have the apartment listings show up (instead of the houses)

re the font awesome icons - for example: where do I add them so that a bed icon shows up before "bedrooms"

#1310603

To switch the homepage to display apartments instead of houses is a bit complex. You must go to Toolset > Layouts and change the usage of the Houses Layout to deselect "Blog/Home". Then you would clone the Apartments Archive Layout and replace the WordPress Archive cell with a custom search View, similar to the one in the Houses Archive Layout. The reason you cannot use the Apartments Layout itself here is that it includes a WordPress Archive cell, which is not designed to be used on the main Apartments archive.

for example: where do I add them so that a bed icon shows up before "bedrooms"
Sorry, I still need more detailed information about where you want this icon. The word "bedrooms" shows up in many parts of the site. Please clarify with a specific location.

#1310611
bed icon.png

Christian Thanks. I will try and follow your instructions.

below i've uploaded an image for the font awesome icon

#1310683

Go to Toolset > Content Templates and edit the Loop Item - Grid template. In the template, find the bedroom field code:

<span class="property-detail" title="Number of Bedrooms">
    	<i class="text-primary"></i> 
  		[types field="property-bedrooms" format="FIELD_VALUE"][/types]
      </span>

Add the classes "fa fa-bed" to the "i" tag just before the types field, like this:

<span class="property-detail" title="Number of Bedrooms">
    	<i class="text-primary fa fa-bed"></i> 
  		[types field="property-bedrooms" format="FIELD_VALUE"][/types]
      </span>
#1310685

My issue is resolved now. Thank you!