How can I hide the "type" such as Type:Service Provider on the front end display throughout the site. I don't want to display this to people but it is useful to collect this info in the backend in case we want to show it in the future.
Hi,
You can try to do this:
Search the file in cpanel: /public_html/components/com_jbusinessdirectory/views/search/tmpl/default.php and change this code (start row 228):
<h4><?php echo JText::_("LNG_COUNTRIES") ?></h4>
<ul>
<?php
if(isset($this->searchFilter["countries"])) {
foreach($this->searchFilter["countries"] as $filterCriteria) { ?>
<?php if(empty($filterCriteria->countryName)) continue; ?>
<?php $selected = isset($this->selectedParams["country"]) && in_array($filterCriteria->countryId, $this->selectedParams["country"]); ?>
<li <?php if($searchType == 1 && $selected) echo 'class="selectedlink"'; ?>>
<div <?php if($selected) echo 'class="selected"'; ?>>
<a href="javascript:void(0)" onclick="<?php echo $selected?"removeFilterRule('country', ".$filterCriteria->countryId.")":"addFilterRule('country', ".$filterCriteria->countryId.")";?>"><?php echo $filterCriteria->countryName; ?><?php echo ($selected)?'<span class="cross">(remove)</span>':""; ?></a>
</div>
</li>
<?php } ?>
<?php } ?>
</ul>
With: (the only difference is the class="hidden-md hidden-lg hidden-xl" added to h4 tag and ul tag )
<h4 class="hidden-md hidden-lg hidden-xl"><?php echo JText::_("LNG_TYPES") ?></h4>
<ul class="hidden-md hidden-lg hidden-xl">
<?php
if(isset($this->searchFilter["types"])) {
foreach($this->searchFilter["types"] as $filterCriteria) { ?>
<?php $selected = isset($this->selectedParams["type"]) && in_array($filterCriteria->typeId, $this->selectedParams["type"]); ?>
<li <?php if($searchType == 1 && $selected) echo 'class="selectedlink"'; ?>>
<div <?php if($selected) echo 'class="selected"'; ?>>
<a href="javascript:void(0)" onclick="<?php echo ($selected)?"removeFilterRule('type', ".$filterCriteria->typeId.")":"addFilterRule('type', ".$filterCriteria->typeId.")";?>"><?php echo $filterCriteria->typeName; ?><?php echo ($selected)?'<span class="cross">(remove)</span>':""; ?></a>
</div>
</li>
<?php } ?>
<?php } ?>
</ul>
This is hiding the type search from front-end - business listing menu page.
From module search you can choose to not display this field.
If you want to dissapear from business page you must choose the style you use for business listing:
path: public_html/components/com_jbusinessdirectory/views/companies/tmpl and edit the style.
For style 5:
Add class="hidden-xs hidden-sm hidden-md hidden-lg hidden-xl" to dt and dd tags
<!-- Business Type -->
<?php if(!empty($this->company->typeName)) { ?>
<dt><?php echo JText::_('LNG_TYPE'); ?>:</dt>
<dd><?php echo $this->company->typeName; ?></dd>
<?php } ?>
with this:
<!-- Business Type -->
<?php if(!empty($this->company->typeName)) { ?>
<dt class="hidden-xs hidden-sm hidden-md hidden-lg hidden-xl"><?php echo JText::_('LNG_TYPE'); ?>:</dt>
<dd class="hidden-xs hidden-sm hidden-md hidden-lg hidden-xl"><?php echo $this->company->typeName; ?></dd>
<?php } ?>
This is not an official answer.