Display images in search results page – Joomla 3.x

By Default Joomla 3.x will display title,metadesc,metakey,created & intro text as per your plugin settings.
Joomla search work with plugins that can be set from search plugin from administrator .
You can disable non required search results from search page by disabling :joomla 3.x search plugin - Akash Chakrawarti Blog

By Default joomla search resulting all
1. Search – Categories
2. Search – Contacts
3. Search – Content
4. Search – Newsfeeds
5. Search – Weblinks

If you want to search your site only content enable content only and disable other plugins by un-checking the check boxes.

Come to development to show the image (image_intro) in search result .

  1. open plugins\search\content\content.php in editor
  2. In two place you will find $query->select(  where it is selecting important values from Database , one query is for normal articles and other is for Archives .
  3. Add one more fetching data that is “a.images AS image” in both Query , Now all article images parameter will come into search result page of content plugin .
  4. Need to see image in search result page Goto components\com_search\views\search\tmpl\search_results.php inside foreach loop write below lines

$image=json_decode($result->image);
$aimage=$image->image_intro;

The variable $aimage will return the path of article intro image .

 

 

Show Buttons
Hide Buttons