Tag Archive: WordPress

WordPress visual editor mangling sourcecode

I tend to post quite a bit of sourcecode, such as bash scripts and PHP scripts. I use the SyntaxHighlighter Evolved plugin to highlight and colorize the sourcecode, as well as make it easy to copy. Unfortunately, I’ve noticed that the WordPress built-in visual editor does a great job of mangling the code, especially by …

Continue reading »

Permanent link to this article: http://mikebeach.org/2013/01/03/wordpress-visual-editor-mangling-sourcecode/

How to fix mangled HTML in WordPress posts using SQL

There are quite a few ways that source code and other preformatted text can get mangled in WordPress, such as a rich-text editor, or even by the export/import process. When I speak of ‘mangled’, I mean unnecessarily HTML-encoded. Left and right angle brackets (the < and > signs), quotation marks (the ” symbol), and ampersands …

Continue reading »

Permanent link to this article: http://mikebeach.org/2012/10/20/how-to-fix-mangled-html-in-wordpress-posts-using-sql/

How to find a keyword in your WordPress posts using SQL

If you have a lot of WordPress posts and might want to find all posts containing a certain keyword for any reason, you can start by using the following SQL code, which was taken from this post. I used this in phpMyAdmin for a MySQL database. Make sure you are in the correct database first! …

Continue reading »

Permanent link to this article: http://mikebeach.org/2011/10/02/how-to-find-a-keyword-in-your-wordpress-posts-using-sql/

Redirect non-www to www (and vice-versa) via htaccess

This is probably old news for a lot of folks, but it’s handy nonetheless and I often have to look up these .htaccess strings. Note that Apache mod_rewrite is required for any of this to work. This (and it’s comments) are based on the Drupal default .htaccess file [License as of 9/30/11: GPL], because the Drupal …

Continue reading »

Permanent link to this article: http://mikebeach.org/2011/09/30/redirect-non-www-to-www-and-vice-versa-via-htaccess/

Determine if current user is an admin in WordPress using PHP

You can determine if the current logged-in WordPress user is an admin and take a certain action in WordPress using PHP. If you’re using a PHP widget plugin, you can use this code in a PHP widget to show or do something if the current user is an admin. You can also use this to …

Continue reading »

Permanent link to this article: http://mikebeach.org/2011/09/04/determine-if-current-user-is-an-admin-in-wordpress-using-php/

WordPress 3.2 admin area display errors under suPHP

If you do the automatic upgrade to the recently-released WordPress 3.2 and notice the admin area displays incorrectly, you may need to reset some file permissions. Simply run the following from your web root: chmod -R g+r,o+r * Should be all set.

Permanent link to this article: http://mikebeach.org/2011/07/05/wordpress-3-2-admin-area-display-errors-under-suphp/

Forcing the WordPress administration over SSL

From the WordPress administration over SSL guide, add the following directive to your wp-config.php file: define(‘FORCE_SSL_ADMIN’, true); This will cause logins and admin pages to force SSL sessions. If you’re having issues making this work for you, check out my article involving Apache and SSL. Questions, comments, and feedback are welcome.

Permanent link to this article: http://mikebeach.org/2011/05/14/forcing-the-wordpress-administration-over-ssl/

Integrating Smart 404 into the Suffusion WordPress theme

By default, WordPress does very little for a user who lands on a 404 or ‘Not Found’ page. The WordPress Smart 404 plugin can help with this, by attempting to match terms from the URL to published articles. This is something you want especially if you change your categories or tags because your old tag- …

Continue reading »

Permanent link to this article: http://mikebeach.org/2011/05/10/integrating-smart-404-into-the-suffusion-wordpress-theme/

My suggestions for WordPress plugins

Here’s my suggestions for a great set of WordPress plugins. The descriptions provided here are from the plug-ins themselves, and the links go to the plugin page on WordPress.org. You can also go to your ‘Plugins’ area in your WordPress dashboard to search for and install any of the below plugins easily. Bad Behavior – …

Continue reading »

Permanent link to this article: http://mikebeach.org/2011/05/04/my-suggestions-for-wordpress-plugins/

WordPress, suPHP, and Ubuntu Server 10.04

If you have WordPress running under an unprivileged user account, you may have noticed that when trying to install or delete a plugin that it prompts you for FTP information. This is due to a rather unintuitive way that WordPress checks for file access: The following code is from the get_filesystem_method() method in the wp-admin/includes/file.php …

Continue reading »

Permanent link to this article: http://mikebeach.org/2011/03/20/wordpress-suphp-and-ubuntu-server-10-04/

Page 1 of 212