A 404 Not Found is generated when a user trying to access a page that doesn’t exists or if a user finds an old page that still is indexed on search engines (broken or dead link). So instead of displaying a 404 page or message you can redirect with a 301 moved permanently to homepage.
August 2nd, 2012
301 Redirect all 404 pages to homepage in WordPress
No Comments, Wordpress, by Joakim Ling.May 23rd, 2012
How to get post ID in content_save_pre on a XMLRPC call
No Comments, Wordpress, by Joakim Ling.If you are using the hook ‘content_save_pre’ and want to save custom values from an XMLRPC call, you have to do a cleaver little workaround. The problem is that the ID is generated when the call is executed which is after this hook.
March 27th, 2012
Get all posts on custom taxonomy slug with get_posts
No Comments, Wordpress, by Joakim Ling.Custom post type is a great way to customize your WordPress and adding new taxonomies makes it even more powerful. All functionality comes with WordPress core but it can be difficult to specific posts on a custom taxonomy. The key in this is the new tax_query argument.
February 21st, 2012
How to use WordPress native Thickbox support in front end
3 Comments, Wordpress, by Joakim Ling.Thickbox is as jQuery plugin that WordPress use as it’s main popup window or modal view. It’s already built-in in WordPress so why not use that in front end. No need to download or import any extra files.
February 15th, 2012
Make custom columns sortable in WordPress admin
2 Comments, Wordpress, by Joakim Ling.WordPress has had the ability since a long time ago to add custom fields to posts. Also called as meta-data. It’s also possible to add these values to your table list and make them sortable.
February 1st, 2012
WP Easy Backup – Save all your custom files and database in one click
8 Comments, Plugins, by Joakim Ling.“WP Easy Backup” is a WordPress plugin that will create a database dump and zip all your media, theme and plugin files.
December 9th, 2011
Get custom taxonomy name from post id with get_the_terms
No Comments, Wordpress, by Joakim Ling.If you’ve registered a custom taxonomy it’s a bit different to get data from than how you’d normally do for categories.
In WordPress 2.9 custom post type was introduced, that opened a new world for many WordPress developers. I’ve come across a painful issue when it comes to removing the slug and not destroying the rewrite rules for other post types. This only concerns those who are using %postname% as permalink structure and want to add a custom post type so that the urls for them are in the same way as normal posts and pages: http://siteurl/%custom_post_type_title%/.
In WordPress almost all customization are built on hooks. Plugins use them to add scripts and stylesheets to the header and themes use them to add flexibility. Sounds great and it is, but it will take some time to get your head wrapped around it. Hope this helps a bit.
October 27th, 2011
WordPress custom page templates not showing
2 Comments, Wordpress, by Joakim Ling.I was confused for a good hour with this problem, scratching my head. My “Page template” drop down had disappeared. Before start digging to deep in WordPress I made sure the files were still in my theme folder, checked that head comments that define a template not gone missing or had been messed up, even checked file permissions so that the files are readable and that the theme is still active, still no drop down.