Tag archive for "wordpress"
WordPress password reset
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
You do not have sufficient permissions to access this page
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
wordpress
do you use wordpress? search engines favor wordpress for some reason wordpress is very dynamic, even fbi and government sites ...
Script to migrate WordPress plugins from SVN to github
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
Import WXR files from server or on plugin activation
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
Set static front page and blog page programmatically in WordPress
You want to make sure the About and Blog pages exist, so create them before if necessary, see wp_insert_post() more
Custom WordPress SQL query for multiple meta values
To check for multiple custom fields you have to join the meta table twice. more
Run code when a new blog is created
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
Custom taxonomy with meta data
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
Order posts in a $wp_query manually
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