How to Add Text Attribute to Images Tag in Editor

If you have noticed, the title attribute was removed in the image tag in WordPress. It was said that it is useless, redundant, and not necessary to SEO, but some of us would still prefer it to be there as some news aggregator sites, like Google News, still use it for indexing. It is pretty […]

How to Merge Categories in WordPress

There are times when you have two similar categories that you want to merge together. When I say merging, it means: 1. Move all the posts from one category to the other (the one you want to merge into). 2. Delete the duplicate category. 3. Add a URL forwarder to redirect the previous category URL […]

How to Create New Permalink Rules

In WordPress, you can easily create a pretty URL by going to the Settings -> Permalinks section and update the permalink structure. However, if you are creating your own themes or plugins, there are times when you need to create a custom permalink structure. For example: you want to implement a permalink: which translates […]

How to Change the Font in HTML Editor In WordPress 3.3

The HTML editor in WordPress 3.3 uses monospace font, which is not really friendly to the eyes. Here’s how to change the font to, say, verdana. 1. Open your theme’s functions.php file. 2. Copy and paste the following code: add_action( ‘admin_head-post.php’, ‘wpdb_fix_html_editor_font’ ); add_action( ‘admin_head-post-new.php’, ‘wpdb_fix_html_editor_font’ );   function wpdb_fix_html_editor_font() { ?> <style type="text/css"> #editorcontainer […]

How to Remove the Width and Height Attributes From WP Image Uploader

If you upload images via the WordPress image uploader and insert it into your post, it will include the image width and height attribute in the html <img> tag. Here’s what it will look like. <img src="path/to/your/image" width="123" height="456" class="aligncenter size-full" alt="" title=""/> In most cases, this is absolutely alright. However, if you are using […]

How to Edit The Excerpt

Changing the Excerpt length Paste this code to the functions.php of your theme folder. function custom_excerpt_length( $length ) { return 30; //change this number to determine the number of words returned } add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 ); Adding “Read More” link after the excerpt function new_excerpt_more($more) { return ‘… Read more »'; //if you just […]

How to Remove Miscellaneous Widgets From WP Dashboard

When you are logged into your WordPress dashboard, you may have noticed that there are many useless widgets that you don’t even bother looking at it, but it is taking up a long time to load. While you can hide them using the screen options, it is better to remove them for good and prevent […]