Hi ludsonaiello,
I’ll need to check with my developer about the details of loading. Some of what you want is contained in our customization guides:
We have 3 options for customizing the look of the directory.
1) First is custom CSS to do basic tweaks like fonts, spacing and colors. 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/
2) For the more adventurous and layout-based changes, you can override templates: http://businessdirectoryplugin.com/support-forum/faq/customizing-bd-to-fit-your-theme/ And also do more with fields: http://businessdirectoryplugin.com/support-forum/faq/advanced-customization-of-the-list-and-detail-views-of-bd/
3) But if that’s not enough, you can go full-bore and customize anything in the plugin if you have the proper skill set: http://businessdirectoryplugin.com/docs/customization-guide/
Hi ludsonaiello,
My developer responded:
The customization guide (http://businessdirectoryplugin.com/support-forum/faq/advanced-customization-of-the-list-and-detail-views-of-bd/) is definitely the best place to go for info about displaying specific fields.
That being said, trying to do that before the content could be problematic because BD might not know (yet) the listing that is going to be displayed. That’s the result of dispatching everything from a shortcode and one of the things addressed in our next major release.
For now, a possible work-around might be something like the following:
<?php
// We need to create a function like this one.
function current_listing() {
global $wpbdp;
if ( 'showlisting' != $wpbdp->controller->action )
return 0;
$id_or_slug = '';
if ( get_query_var( 'listing' ) || isset( $_GET['listing'] ) )
$id_or_slug = get_query_var( 'listing' ) ? get_query_var( 'listing' ) : wpbdp_getv( $_GET, 'listing', 0 );
else
$id_or_slug = get_query_var( 'id' ) ? get_query_var( 'id' ) : wpbdp_getv( $_GET, 'id', 0 );
$listing_id = wpbdp_get_post_by_id_or_slug( $id_or_slug, 'id', 'id' );
return $listing_id;
}
// Display or obtain the value from a specific field for the 'current' listing, as per
// http://businessdirectoryplugin.com/support-forum/faq/advanced-customization-of-the-list-and-detail-views-of-bd/.
$field = wpbdp_get_form_field( 4 );
echo $field->display( current_listing() ); // This prints all HTML output for field with ID 4.
echo $field->value( current_listing() ); // This prints just the value for the field with ID 4.
?>
I hope that helps. Please let me know if you have any other questions or issues!