Hello,
I was super excited and ready to copy the content of y old custom fields form quadrum theme to the newspaper theme video field then I realised, it’s not just the URL that needs to copy đ
META KEY for old field is “quadrum_video” and the meta_value is the video URL: https://www.youtube.com/watch?v=FDiHbIsIqLE , as example.
Newspaper theme has parameters with it.
META KEY for newspaper theme is “td_post_video” and the “meta_value” is stored like this:
a:1:{s:8:”td_video”;s:43:”https://www.youtube.com/watch?v=FDiHbIsIqLE”;}
PLEASE can you help me with the SQL query that will copy the URL from the old field to the new field with the new formatting.
Thank you in advance!!!
Hi,
The meta_value data is serialized, you can read about it here – https://nacin.com/2010/04/18/wordpress-serializing-data/
You can try using wp cli – http://wp-cli.org/commands/search-replace/ – Unfortunately i cannot provide a solution for this, sorry, i didn’t do any tests with wp-cli yet. If you don’t know how to doit you should look for a professional developer to help you with this, you can find one on places like http://studio.envato.com/
And even if you manage to replace the data, the theme retrieves the video thumbnail and sets it as a featured image. This process happens when you save the post – http://screencast.com/t/o5QnAL8udLv
Thank you!
Hi Emil,
I have paid a professional developer today and after the entire day he said it cannot be scripted in as the action is triggered, for saving and converting to your format, when SAVE POST is clicked. So I have to go back to my client with two options; pay someone to manually copy and paste the video URL and save and change format to VIDEO, or back to old theme. Honestly I had a contractor on it all day and multiple tries failed and a second one I requested support from today via peopleperhour.com knows your theme and also said it’s not possible.
Hi,
I suspect that on your old posts you already have a featured image set so this shouldn’t be an issue.
If you still want to get the video thumb, first replace the urls in the database and mass edit all those posts using quick edit – http://screencast.com/t/NTcx8UMs and just save the settings – http://screencast.com/t/NsYSGGXC
You can increase the number of posts displayed from the display panel and filter by category – http://screencast.com/t/a9W25eN4Cq
If it doesn’t work try to comment the following line – http://screencast.com/t/eRH8rizhIvHh – and save the posts again. Hope this helps.
Thank you!
