WordPress.org

Ready to get started?Download WordPress

Forums

Business Directory Plugin
[resolved] Form Fields that only show in Excerpt? (5 posts)

  1. canwild
    Member
    Posted 1 year ago #

    Is it possible to set form fields so they ONLY appear in the excerpt and not in the single listing view? I would like to have a short description that only appears in the excerpt and a long description that only appears in the single listing view. Currently, the single listing view shows all the form fields including both the short and the long descriptions.

    http://wordpress.org/extend/plugins/business-directory-plugin/

  2. canwild
    Member
    Posted 1 year ago #

    As a workaround, I ended up using an HTML Parser to remove the "excerpt" div from $listing_fields in my "businessdirectory-listing" template. Is there a better way to do this?

  3. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    Hi canwild,

    As far as I know, without hacking the plugin, you can't do that. We would have to modify it such that when a field is set to display in the excerpt, that it goes only to the excerpt and not the single listing.

    Can you give me a scenario where this makes sense? I understand the technical aspect, but I'd like to understand the business case for it as well.

  4. canwild
    Member
    Posted 1 year ago #

    Normally you want "the_excerpt()" to appear in the "excerpt" view (e.g., View Listings) and "the_content()" to appear in the "single" view (e.g., View Listing). As WPBDP is currently coded, the "single" view includes both "the_excerpt()" and "the_content()".
    From a business perspective there are potentially other items when you may wish to display a short code in the "excerpt" view and more detail in the "single" view. Perhaps an note or icon in the "excerpt" view to indicate that the "single" view includes a detailed map, video, more photos, etc.
    For each form field, you may want the option to specify if the field is to be displayed in the "excerpt only", "single only", or "both". Ideally, you may also want the option to display the "excerpt" fields in a different order than the "single" fields.
    I think WPBDP does provide a way to display individual form fields so all of this can already be accomplished through more complex templates. However, I am not sure if the info on http://businessdirectoryplugin.com/docs/matching-the-design-to-your-theme/ is up to date since it refers to "wpbusdirman" functions which I believe have been deprecated.

  5. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    Yep, totally agree--we're looking to add this for a future release. Maybe in 2.1.3, but definitely soon. Stay tuned.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.