Daniel Francis
asked 10 years ago

I have a site that is built in a CMS system called Vivvo, which is now redundant so I am building a WordPress one.  I have installed and am going to use your Questions and Answers plugin but I would like to import the questions and their answers that I have currently on my site.  They are available to me in in an SQL database and I’m trying to work out to import them into my new wordpress site so that they show up in the relevant questions and answers areas in your plugin.  Can this be done through SQL or another way perhaps via CSV importer?!

2 Answers
BigHug
answered 10 years ago

Hi Daniel Francis,
You can use WorPdress import tool to do  this. Please go to Dashboard > Tools > Import/Export then choose WordPress Import, select Question , then Answer post type to Import/Export ( If you import data, please add your questions before answers ).
Regards

Daniel Francis
replied 10 years ago

Thank you for responding. Although the explanation doesn’t really tell me how to do it. I went to Dashboard > Tools > Import/Export then choose WordPress Import, what do I then do?! What file format should it be in? What structure? My previous site was not a wordpress site, so I’m going to have to construct a file in the correct structure with the information within it to then upload so that it appears in the the plugin page.

xzen xzen
answered 10 years ago

You can use WP Allimport plugin with the call php function to get post id from meta key and value.
Key to connect Question and Answer is custom field _question (from DWQA plugin)
My data are in CSV, I have only one answer, I use this forum for FAQ.
“lister_id”;”post_title”;”dwqa-question”;”dwqa-answer”;”keywords”;”user_id”;”date”;”date_send”
“225”;”Question title 1″;”question text”;”answer text 1″;”tag1, tag2″;3;”2008-10-08 14:44:31″;”2008-10-10 14:44:31″;
“226”;”Question title 2″;”question text”;”answer text 2″;”tag3, tag4″;3;”2009-10-08 14:44:31″;”2009-10-12 14:44:31″; 
Use this function (functions.php in current theme):
https://gist.github.com/feedmeastraycat/3065969

1st step – import questions: Load Unique ID values “lister_id” to extra Custom field with name “qimport”, value: [{lister_id[1]}]
2nd step – import answers: Call this function in custom field name: _question value: [get_post_id_by_meta_key_and_value(“qimport”,{lister_id[1]})]
I didn´t try for more answers for one question
 
 
 

Abdur Rehman
replied 9 years ago

Did you find a way for your problem i also have same problem please can any one help xzen xzen can you enplane it for multiple .

Dominic Staff
replied 9 years ago

Apologies for the delay in replying to you.At the moment, you just can import & export via Dashboard > Tools section.Regards,

Powered by DW Question & Answer Pro