Title: Search Shortcode
Last modified: February 24, 2022

---

# Search Shortcode

 *  Resolved [westefan](https://wordpress.org/support/users/westefan/)
 * (@westefan)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/)
 * Hi,
    is it possible to restrict search form (shortcode) to specific categories?(
   similar to cars list shortcode) Or to change category choice from dropdown to
   a image choice? Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsearch-shortcode-12%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [e4jvikwp](https://wordpress.org/support/users/e4jvikwp/)
 * (@e4jvikwp)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15400850)
 * Hi,
 * Thanks for the detailed request. Unfortunately, the “Search Form” shortcode does
   not accept any parameters or filters to render the layout differently. This means
   that forcing the search over a specific category ID isn’t possible, I’m sorry.
 * As you may have noticed, if categories are enabled, then that Shortcode will 
   actually display a drop down menu for the users to select a specific category
   ID, but it’s a free choice, an optional filter.
 * If you were to create an override to display a hidden input value with the ID
   of the category you want to force, then you would be stuck with that specific
   category ID and the same Shortcode could not be used in any other way, maybe 
   with a different category ID because you have forced the source code through 
   an override.
 * The only valid solution would be adding a new parameter to that Shortcode, but
   at the moment this is not available. We may add it with the next updates.
    However,
   please do not forget that the widget “Search Form” (not the Shortcode) has got
   that exact parameter you need. You can always consider to use the widget instead
   of the shortcode, and maybe make the widget point to that shortcode to keep the
   URL you prefer.
 * We hope this helps!
 * The VikWP Team
 *  Thread Starter [westefan](https://wordpress.org/support/users/westefan/)
 * (@westefan)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15403285)
 * Hi,
    thanks for your quick response! The widget solution would be perfect, but
   it doesn’t work. After entering the dates and click on search I return to search
   form. Maybe you can look at [https://dev.abschleppen-bergen.at/vermietung/](https://dev.abschleppen-bergen.at/vermietung/)?
   Or is it a Pro functionality? Best regards
 *  Plugin Author [e4jvikwp](https://wordpress.org/support/users/e4jvikwp/)
 * (@e4jvikwp)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15403326)
 * Hi,
 * This is not a Pro functionality at all, the widget is simply missing a page to
   be used for the action of your form, hence to calculate the landing page.
 * You should edit the parameters of your widget (either from the Appearance – Widgets
   native page of WordPress or by using the page-builder plugin that is currently
   rendering the widget), and right where you saw the param “Force Specific Category”,
   you will find also a parameter called “Page”. This must be set to a Shortcode
   of Vik Rent Car connected to an existing page/post, even the Shortcode you “Search
   Form” you were testing on your first message.
 * In short, that parameter “Page” of your widget must not be empty, it must be 
   set to an existing Shortcode of Vik Rent Car properly configured, and that URL
   will then be used to parse the routing URL for the reservation process.
 * Best regards,
    The VikWP Team
 *  Thread Starter [westefan](https://wordpress.org/support/users/westefan/)
 * (@westefan)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15403789)
 * Hi and thanks again!
    I guess I understand the principle now. Another question:
   I’ve set the widget VikRentCar Cars on [https://dev.abschleppen-bergen.at/home/baumaschinenvermietung/](https://dev.abschleppen-bergen.at/home/baumaschinenvermietung/)
   with a filter by category “Baumaschinen” but I get a list with all categories.
   What’s wrong with my settings? Best regards Stefan
 * PS: I’m sure I will buy Pro version
 *  Plugin Author [e4jvikwp](https://wordpress.org/support/users/e4jvikwp/)
 * (@e4jvikwp)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15403976)
 * Hi Stefan,
 * The link you gave us is no longer displaying the search form widget, maybe you
   removed it or you changed page. In any case, when the widget parameters are forcing
   a specific category ID, you can easily find this hidden input field within the
   HTML source code of the widget.
    If you use the browser inspector tool, you can
   easily check what elements that form contains. If you are sure that the parameters
   of the widget are properly set, then all we can suggest is to look at the Configuration
   page in the main plugin Vik Rent Car, to make sure Categories are enabled, as
   it may be required to enable them before being able to force one.
 * Best regards,
    The VikWP Team
 *  Thread Starter [westefan](https://wordpress.org/support/users/westefan/)
 * (@westefan)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15404152)
 * Hi and sorry, my fault: I didn’t check the widget setting for ordering and filtering.
   Now it works.
    Best regards

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

The topic ‘Search Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/vikrentcar/assets/icon-256x256.png?rev=2203504)
 * [VikRentCar Car Rental Management System](https://wordpress.org/plugins/vikrentcar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/vikrentcar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/vikrentcar/)
 * [Active Topics](https://wordpress.org/support/plugin/vikrentcar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/vikrentcar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/vikrentcar/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [westefan](https://wordpress.org/support/users/westefan/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/search-shortcode-12/#post-15404152)
 * Status: resolved