do you mean the previous questions aren’t showing up in the plugin or in the whole website?
To make them show up in the plugin you will need to change their post type to question. They should still show up on your website though.
hi!
they are not showing in the plugin. How can i change their post type to question?
The post type is just a field in the posts table of the wordpress database. If all your “posts” are actually “questions” you could use a script to change them all. I could write you one.
Otherwise you’ll have to manually go through the database to change them. To do this you you will some sort of program to allow you to edit your database directly. If you have webhosting then it is likely that the your host provides a program like phpMyAdmin. If you are working on a local development site you can use the my sql command line or something similar.
Hope this helps.
if you can write a script, it will be fine. otherwise i will do it manualy through phpmyadmin!
thanks again for your answer 🙂
Something like the following should do. I haven’t tested it though so there might be a bug or two.
<?php
include "wp-config.php";
global $wpdb;
$result = $wpdb->update("$wpdb->posts", //table to update
array('post-type'=>'question'), //change post type to question
array('post-type'=>'post') //update all 'posts'
);
if(!$result){
echo " there was an error";
}
else{
echo "$result posts were changed to questions";
}
?>
sorry about the delay
PS you will need to place the code in a file with the .php extension in the root of your wordpress installation (the folder with wp-config.php in it).