WordPress.org

Ready to get started?Download WordPress

Forums

Business Directory Plugin
[resolved] Adding a placeholder in the search bar (7 posts)

  1. rikardo85
    Member
    Posted 1 year ago #

    Hello,

    Is it possible for me to add a placeholder in the search bar?

    Thanks

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

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    Hi rikardo85,

    If you wanted to make any changes to the search bar itself, you'd have to hack the plugin to do so, but yes, I'm sure it would be possible in that case.

  3. rikardo85
    Member
    Posted 1 year ago #

    Thank you,

    Can you please guide me to the file where I can make the change?

    Thanks

  4. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    Each of the templates has this in it:

    <?php if (!$excludebuttons): ?>
            <div class="wpbdp-bar cf">
                <?php wpbdp_the_main_links(); ?>
                <?php wpbdp_the_search_form(); ?>
            </div>
        <?php endif; ?>

    Not sure what you want or where you want to put it--but you can either modify the output of one of those functions above, OR change the templates to add the HTML you want before/after them. You can search the source code for those functions to find the right files.

  5. amro81
    Member
    Posted 11 months ago #

    hello

    I would like to search for multiple fields in the simple search(not in Advanced Search).
    When I search in the listing for the keywords or Tags, I get "No listings found. Return to directory.".

  6. businessdirectoryplugin
    Member
    Plugin Author

    Posted 11 months ago #

    Hi amro81,

    That is correct--the "simple search" searches the title and category fields, although I think we ought to add tags to this search as well.

  7. amro81
    Member
    Posted 11 months ago #

    Hello businessdirectoryplugin Member,

    thank you again for the great Plugin.

    I have solved it for me temporarily like that.
    $html .= '<input type="hidden" name="q" value="" /><input id="" maxlength="150" name="listingfields[9]" size="20" type="text" value="" />';

    I have picked out the field that I need.

    But I think it's better if it could be sought in the simple search for different words. e.g. by website, opening times, phone number .. etc. Then there would be dynamic

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic