
Originally Posted by
5starpix
Its been working fine, but it does not display the business addresses. It only shows the company name and phone number/email or website.
I don't have this plugin installed so I can't test this, but after having a quick look through it, I may be able to help you with that.
Open functions.php (make a backup first) of the plugin and around lines 255-257 you'll find :
PHP Code:
if(!empty($l->company_phone))
$directory .= @$l["company_phone"]."<br/>";
$directory .= "</td></tr>";
After $directory .= @$l["company_phone"]."<br/>"; and Before $directory .= "</td></tr>"; insert
PHP Code:
if(!empty($l->company_street1))
$directory .= @$l["company_street1"]."<br/>";
if(!empty($l->company_street2))
$directory .= @$l["company_street2"]."<br/>";
if(!empty($l->company_city) && !empty($l->company_state) && !empty($->company_zip))
$directory .= @$l["company_city"].", ".@$l["company_state"].", ".@$l["company_zip"]."<br/>";
if(!empty($l->company_country))
$directory .= @$l["company_country"]."<br/>";
So it now looks like this:
PHP Code:
if(!empty($l->company_phone))
$directory .= @$l["company_phone"]."<br/>";
if(!empty($l->company_street1))
$directory .= @$l["company_street1"]."<br/>";
if(!empty($l->company_street2))
$directory .= @$l["company_street2"]."<br/>";
if(!empty($l->company_city) && !empty($l->company_state) && !empty($l->company_zip))
$directory .= @$l["company_city"].", ".@$l["company_state"].", ".@$l["company_zip"]."<br/>";
if(!empty($l->company_country))
$directory .= @$l["company_country"]."<br/>";
$directory .= "</td></tr>";
Now that should hopefully produce an address output which looks like the following (assuming each field has a value):
Code:
123 Fake Street
Suite #1
Fake City, Fake State, 12345
Fake Country
Again, this was from just a quick look at the plugin's code. I have no idea if it will actually work. So make a backup of the functions.php file and give this a shot and let me know if it works or not.
Bookmarks