• abuswaisan

    (@abuswaisan)


    Hello, I am all new to WordPress and was looking for help please.

    I am using CL classified listing plug in. I created Categories, listing types and Custom fields. In custom fields I want to add Car Brands and models as a select menu. Do I have to enter them manually? or Is there a way to import a full (as much as possible) list of car brands and models?

    It will take forever to add them manually specially that the car models should be specific to car brands.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • svenratkajec

    (@svenratkajec)

    You can try downloading a car brands JSON file from internet (https://github.com/matthlavacka/car-list/blob/master/car-list.json) and then fetch it with REST API and put them in select option or whatever you have.

    Thread Starter abuswaisan

    (@abuswaisan)

    Thanks, I got your point. If you dont mind me asking again :D.

    I was looking at Zyla API (Automobile Data API). Is there a way to import this to my website? maybe convert it to json file or connect it directly. and please if yes could you please write me a simple steps to how to do it? (please keep in mind that I will google each step to learn how to do it).

    I register with Zyla and Thy have Endpoints and I am not sure what to do with it.

    • This reply was modified 3 years ago by abuswaisan.
    svenratkajec

    (@svenratkajec)

    This can be pretty hard to do if you have no experience in coding. All this is done with javascript. The simplest solution i propose to import custom js is to download a “Custom CSS and JS plugin” and make a new js snippet.

    1. Study a documentation of Automobile Data API to learn how to send a GET request for the wanted resource
    2. Google how to send a fetch request with vanilla javascript and get data
    3. You shall get a JSON format (similar format to arrays which are important concept of javascript) after fetching the data and then you can start working on displaying the data (getting the element by classname and embed HTML content into it). Note that you fetch every json object with FOR EACH loop (though everything about it should be explained in a video if you search how to send a fetch request).

    That should be pretty much all. If i missed something feel free to ask.
    Best regards and wish you success in this task!

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

The topic ‘importing custom fields’ is closed to new replies.