Support » Fixing WordPress » Search Plugin Development

  • Im newbie in plugin development. Please help me or guide me some basic codes for plugin development.

    I want connect my table to search box.

    Thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • @amapeu and @v123shine thanks to help me. I know basic template for plugin development. My actually problem is connect theme search box with table wp-article. in form action i could not understand meaning codes.

    <?php echo esc_url( home_url( ‘/’ ) ); ?>

    my form codes

    <form role=”search” method=”get” class=”search-form” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>
    <label>
    <span class=”screen-reader-text”><?php echo _x( ‘Search for:’, ‘label’, ‘twentysixteen’ ); ?></span>
    <input type=”search” class=”search-field” placeholder=”<?php echo esc_attr_x( ‘Search …’, ‘placeholder’, ‘twentysixteen’ ); ?>” value=”<?php echo get_search_query(); ?>” name=”s” title=”<?php echo esc_attr_x( ‘Search for:’, ‘label’, ‘twentysixteen’ ); ?>” />
    </label>
    <button type=”submit” class=”search-submit”><span class=”screen-reader-text”><?php echo _x( ‘Search’, ‘submit button’, ‘twentysixteen’ ); ?></span></button>
    </form>

    I think there is no wp-article table, at least in the wp database. What do you mean by wp-article table?
    esc_url(); cleans a URL. More info

    i create wp-article table and search box search data from it if not found then store data in wp-newsearch table

    Could you specify more details? What’s the objective of this plugin?

    when user search any keyword in search box. If article available in WP-ARTICLE table then display other wise new keyword store in second table WP-NEWKEYWORD table or in admin dashboard admin can watch how many search come in day, week or month. how many successful.

    could you help how develop this plugins

    I could only recommend this Codex’s Page.

    https://codex.wordpress.org/Creating_Tables_with_Plugins

    i’ve read all this and generate codes for auto generate tables. I only stuck here how i attach created tables to search box.

    action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>

    what i assign in action i don’t know!!!

    I can manage further if search box connect to tables.

    Hi @wpdebug, it is my understanding that you would like to map certain search keywords to specific posts.

    Examples:

    * User searches for “bob” and is automatically redirected to the post titled “Back on the Burrito Train” (based on the administrator previously linking this keyword to this post)
    * User searches for “joe” and is automatically redirected to the post “The Dirt of Blueberry Hill”
    * User searches for “jim” and is automatically redirected to the post “Beef Jerky – Spice Up Your Life”

    Is my understanding correct for the plugin that you would like to develop?

    yes you are right. but if not found then store that keyword in new table

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @wpdebug, Please don’t create a new thread on the same topic. We don’t do urgent support here because we’re all volunteers that are helping out of our spare time.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Search Plugin Development’ is closed to new replies.