Tag archive for "wordpress"
Recently I had to update a site but didn't have an admin account or access to the SQL database. So I wrote this short script to reset a forgotten password. To use it, edit it and fill in the proper values. Then upload it to the wp-content/mu-plugins/ directory, create the ... more
Are you getting "You do not have sufficient permissions to access this page." errors everywhere in the WordPress admin? I had this happening on a site, apparently the problem is that somebody changed the database prefix. It's a little suprising that this would totally break the admin, but whatever... As ... more
do you use wordpress? search engines favor wordpress for some reason wordpress is very dynamic, even fbi and government sites ...
Update: This script is almost obsolete as github will switch to their v3 API on may 1st, 2012 and doesn't display the API token any more... With this this script you can easily migrate a WordPress plugin from the wordpress.org svn repository to github. This script will NOT import the ... more
I recently patched the WordPress reset plugin to make it possible to reactivate multiple plugins after the reset. Until sivel releases an update you can download the patched version from my server. As I frequently need to wipe WordPress installs during development I was looking for a way to auto-load ... more
You want to make sure the About and Blog pages exist, so create them before if necessary, see wp_insert_post() more
To check for multiple custom fields you have to join the meta table twice. more
Run some code when a new blog is created. I'm not sure, but I guess this code has to be in a network-activated or mu-plugins plugin. Maybe having this code enabled in the blog you're using will suffice. more
This snippet shows how you can add metadata to your existing custom taxonomy. So you can use update_metadata() and get_metadata() on your taxonomy. The filter on switch_blog is only necessary if the code runs on a blog network (recommended to implement anyway). The name of the database table is very ... more
Build a custom WordPress query and order the posts however you want them. Notice that this won't work properly if you page results, so it is only useful in very specific cases. Btw, wrap everything into your class and get rid o the global var when you use this ;-) more