HOW TO CHANGE CUSTOM FIELD STRUCTURE

Home Forums Product Support Forums Ajax Search Pro for WordPress Support HOW TO CHANGE CUSTOM FIELD STRUCTURE

This topic contains 6 replies, has 2 voices, and was last updated by Jimmyk3291 Jimmyk3291 6 years, 9 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5997
    Jimmyk3291
    Jimmyk3291
    Participant

    Hello,

    I am looking for a way to make a 3 column search form.

    Type search on the left
    Portfolio Category dropdown on the center.
    Portfolio Tags dropdown on the right.

    How can I do that?

    I know how to add custom fields but they only appear on a default location.

    All I want is three bars one next to the other where people can simply type or choose their preference.

    #6004
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I don’t think this is possible. The only way I can imagine something similar is to divide the content where you want to place the search to 2 columns. One with 33% and one with 66% width. Place the search shortcode to the left column (33% width) and place the settings shortcode to the right column (66% width). More about shortcodes here.

    Then I would set the settings to be visible by default, set the switch to invisible and the layout position to block: https://i.imgur.com/yYlXC5O.png

    The code would look roughly something like this:

    
    <div style='float:left;width: 31%;padding: 0 1%;'>
      [wpdreams_ajaxsearchpro id=1]
    </div>
    <div style='float:left;width: 62%;padding: 0 1%;'>
      [wpdreams_asp_settings id=1 element='div']
    </div>
    <div style='clear:both;'></div>
    

    This is just a very quick example.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6049
    Jimmyk3291
    Jimmyk3291
    Participant

    Hello,

    Where exactly do I add this code?

    If this is not easy to do then can you please instruct me on how to build a search form similar to the “TV Form” on this page?

    Thanks,

    #6125
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I’m working on video tutorials on how to create more complex forms, some of them should be available this week 🙂

    You can use the upper mentioned code in any post or page.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6127
    Jimmyk3291
    Jimmyk3291
    Participant

    Hello again,

    I mean no offence, but this is not very helpful. I bought this widget thinking that I can make a search form similar to the “TV Form” that you had on your website. Now, many weeks have passed still I bought this and I am still not able to use it. I understand that a video might be helpful but there really is no time to wait now, so I would really appreciate it if you could send me some instructions on how to change the structure of my form.

    Thank you very much in advance,

    #6129
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I fully understand your point, and I wish this was easier to me as well. I can try explaining how it’s done,

    1. To create such complex forms, first of all you will have to create and use custom fields. If you are not familiar with them, you can read more in the wordpress codex.

    In very short: Custom fields are basically data fields attached to a post or page or a custom post type (like a product, or forum topic). Each and every custom field has a name and a value. The article I linked above will explain how you can create such custom fields.

    2. Once you understand how custom fields work, and you maybe created a few for testing, then you can proceed to create the search fields as seen on the TV demo. There is a chapter in the documentation you should read through, which explains fully how you can create these fields: https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/frontend_search_settings/custom_field_selectors.html

    The basic concept of this is, that you can create various items (radio buttons, checkboxes, sliding bars) for any selected custom field.

    Let’s take the TV size slider as an example:
    – First I created all the TV products I wanted.
    – Then I opened the first one an added a custom field called “tv_screen_size” and as the value I entered 50. Screenshot.
    – I repeated this process for each and every TV product I created. The screen sizes were different for some of them of course.
    – Then when I was done entering the fields, I created the range slider on the search options page as following: https://i.imgur.com/w6VS65I.png
    – Hit the blue SAVE button on the editor, then the Save All tabs button.
    – The range slider should be now visible on the front end.

    To add more and more different selectors, just repeat this process.

    I’m sorry if something is not clear, it’s very hard to explain as the developer as I might see this differently from a customer.

    Let me know if you need any more help.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6449
    Jimmyk3291
    Jimmyk3291
    Participant

    Hello,

    I appreciate the effort and I understand what you are saying but I do not understand how this can help me.

    I am looking to build a search form that will look into 3 parameters, search typing, portfolio category and portfolio tags. I do not need to create extra fields because these options are already available on your plugin.

    I went to General Options -> Sources and I selected Portfolio_page on the “Search in custom post types” panel. I also selected portfolio categories and portfolio tags on the source 2 page, on the Return taxonomy terms as results. What else do I need to do in order to make this search type appear? And also how can I have multiple boxes with these options, portfolio category and portfolio tags instead of simply one big search bar.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.