1

I apologize... I'm not sure where to begin and thought posting in this general WP forum would be the best start.

I have a site that I want to change the theme on. The problem is that the current theme (Theme.co X Theme) uses custom fields to store information: in this case, the iFrame embed code for YouTube videos on a Video Post type (stored in the "_x_video_embed" custom field).

I want to change themes... but the new theme (Vlog) doesn't know anything about the data stored in the custom field (of course, I wouldn't expect it to)... and expects any reference to a video to be in the main post content.

Other than manually going through (hundreds!) of posts to copy-and-paste the content from the custom field into main post content (ideally prepending it to the beginning), what can I do? I was thinking about exporting the contents of the postmeta table, manipulating it, and finding some way to use the Post ID to connect it back to the actual post entry... and prepend the iframe code.

But I'm thinking there's got to be some other (better?), more Wordpress-y way to get this done.

Can anyone point me in the correct direction to get me started?

Thanks!

0

The only way that this theme can do that is by using some kind of function to do so. Start in the themes functions.php file and look for the function(s) responsible for this field.

They might also be included into that file, and therefore reside in another file.

2
  • Thanks! Based on your response, one of the "Related" posts listed here looks like it may do the job ( wordpress.stackexchange.com/questions/71886/… ). I'll need to make some tweaks to the code, as I don't want to REPLACE the post content, just append to it... but that should be fairly easy. Appreciate the help! – RVgeeks Apr 20 '17 at 19:07
  • My pleasure, good luck :) – mayersdesign Apr 20 '17 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.