Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

waraulin on "Business Directory Plugin csv-export.php modification"

$
0
0

Hello!

I'm trying to alter the csv-export.php file in the Business Directory Plugin in order to make the csv export only export the business emails without any of the other listing info (name, phone #, address, etc).

I have experience coding other languages so I feel like this should only take a simple if statement or modification to the location in the array but I know little to no php so I'm struggling trying to figure this out.

I believe this is the section of the csv-export that I need to change:
`// Setup columns.
$fields = wpbdp_get_form_fields();
foreach ( $fields as &$f ) {
$this->columns[ $f->get_short_name() ] = &$f;
}`

So again, all I want to do is export only the business emails column, which I'm assuming would be at position 7 in the array. I'm not sure if the $fields array is an integer array or string array, I'm thinking it might be strings of the field names because I tried putting in different integer positions in there and the csv export resulted in a blank file.

Here are all of the fields/columns:
business-name business-genre short-business-description long-business-description business-website-address business-phone-number business-fax business-contact-email business-tags

Thanks a lot!
-Will


Viewing all articles
Browse latest Browse all 8245

Trending Articles