modestvolta
Member
Posted 1 year ago #
Is there any way to find the content of the default wordpress text widget? Would it be in a php file somewhere?
backstory: I recently changed hosts, and I copied all of my content from the last host before switching thinking I might be able to reuse some of the code. Part of the code I want to use was inside my text widget, which I dumbly didn't save manually before switching.
thanks!
It would likely be saved in the database installation that it was using. Do you have access to that, because that was probably where it was?
Denis Leblanc
Member
Posted 1 year ago #
You can find the file at: /wp-includes/default-widgets.php on line 364.
You shouldn't edit this file though cause next time you update WordPress it's likely to get overwritten. You should only use it for reference if you're creating a custom widget.
Here's a good post on creating your own widgets: http://dev7studios.com/resources/wordpress-development-for-designers-part-1/
modestvolta
Member
Posted 1 year ago #
@stepquick - it looks like I might have access to that database. I'm not sure where to begin looking though for that data (I really should have planned this move better, but oops!)
@Denis - that's the code for the actual widget, but I'm looking for the content I placed in the widget. thanks though!
Denis Leblanc
Member
Posted 1 year ago #
Right, I only read the top part. The content should be in the 'wp_posts' table in the database. If you have a lot of posts then it should be pretty hard to find.
modestvolta
Member
Posted 1 year ago #
It turns out I didn't have access to the database anyway. I was able to piece together everything I needed (and learn something new in the process), so no real issue on my end. Thanks!