Title: Return field values
Last modified: August 30, 2016

---

# Return field values

 *  Resolved [SWC_Scotty](https://wordpress.org/support/users/swc_scotty/)
 * (@swc_scotty)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/)
 * Can you tell me how to return a field value inside a listing/excert without the
   html formatting? If not, can you tell me how to edit the formatting that is output.
 * Currently using this: `$field = wpbdp_get_form_field( 1 );
    echo $field->display(
   $listing_id );`
 * but that shows the label and other html.
 * Please help!
 * [https://wordpress.org/plugins/business-directory-plugin/](https://wordpress.org/plugins/business-directory-plugin/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717740)
 * Hi SWC_Scotty,
 * Sorry that you ran into issues here!
 * Have you tried the suggestions in our Advanced Customization guide? That article
   walks through some of this here: [http://businessdirectoryplugin.com/support-forum/faq/advanced-customization-of-the-list-and-detail-views-of-bd/](http://businessdirectoryplugin.com/support-forum/faq/advanced-customization-of-the-list-and-detail-views-of-bd/)
 * Keep in mind you can’t just use that on any old page–it has to be a page where
   the BD loop is active.
 * Try that first and if that’s not working, let me know.
 *  Thread Starter [SWC_Scotty](https://wordpress.org/support/users/swc_scotty/)
 * (@swc_scotty)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717794)
 * Thanks for the clarification. Further to my question above maybe you can help
   me with the images.
 * How can i pull an unformatted main image url from the database? Failing that,
   how can i edit which css classes are applied to the formated $main_image variable.
 * Thanks.
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717834)
 * The customization guide has some tips about pulling image data, but if you want
   to go with the CSS route, you can override the CSS classes you find in Firebug
   using custom CSS.
 * Here is an article about how to use custom CSS with Business Directory in a way
   that doesn’t get overwritten on upgrade of BD: [http://businessdirectoryplugin.com/support-forum/faq/how-to-use-custom-styles-with-bd-2-1/](http://businessdirectoryplugin.com/support-forum/faq/how-to-use-custom-styles-with-bd-2-1/)
 *  Thread Starter [SWC_Scotty](https://wordpress.org/support/users/swc_scotty/)
 * (@swc_scotty)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717865)
 * I’ve searched the page and can find no mention of specifically pulling image 
   data. I want just the path of the image.
 * Regarding CSS, i wouldn’t want to change the existing classes but rather add 
   others to correspond with other plugins etc. How can i change which classes are
   appended to the image.
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717883)
 * So let me make sure that I understand what you want–what do you mean by “main
   image URL” in this case?
 * The primary image of the listing?
 *  Thread Starter [SWC_Scotty](https://wordpress.org/support/users/swc_scotty/)
 * (@swc_scotty)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717907)
 * Well currently when i use $main_image it returns a whole host of html data and
   not just the path to the image.
 * The only reason I wish to pull just the path is because I need to change the 
   HTML. If i can’t do that, i’ll create my own and just put the image path in. 
   I want to put it in my own classes that work with my javascript etc, not just
   edit the existing style.
 * I’d rather know where the following string gets formed so I can edit this.
    `
   <div class="listing-thumbnail"><a href="xyz" class="thickbox" data-lightbox="
   wpbdpgal" rel="wpbdpgal"><img width="150" height="150" src="xyz" class="wpbdp-
   thumbnail attachment-wpbdp-thumb wpbdp-single-thumbnail" alt="Naughty Cat Media"
   title="Naughty Cat Media" /></a></div>`
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717925)
 * Let me check with my developer and see what he says, specifically.
 *  Thread Starter [SWC_Scotty](https://wordpress.org/support/users/swc_scotty/)
 * (@swc_scotty)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717971)
 * Any luck?
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717972)
 * I haven’t heard back yet, but it was the weekend when I gave it to him, so give
   it a bit.
 * Thanks for being patient.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Return field values’ is closed to new replies.

 * ![](https://ps.w.org/business-directory-plugin/assets/icon-256x256.png?rev=2901888)
 * [Business Directory Plugin - Easy Listing Directories for WordPress](https://wordpress.org/plugins/business-directory-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/business-directory-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/business-directory-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/business-directory-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/business-directory-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/business-directory-plugin/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/return-field-values/#post-6717972)
 * Status: resolved