5794 readers
Rewrite Rules Inspector is a simple development tool for viewing all of the rewrite rules registered with your site. It’s been available for VIPs hosted on WordPress.com for a while — today it’s available for download from the WordPress.org repository.
Specifically, the Rewrite Rules Inspector helps you:
View a listing of all your rewrite rules.
See which rewrite
9371 readersOn the weekend I updated the Post Gallery Widget plugin. when I was working on another plugin, I noticed that my test site had rewrite rules for the post gallery posts. Not only are they not necessary, we don’t want the gallery posts to be publicly accessible via a URL. So, the update removes the
7384 readersWhile manually upgrading a bunch of old WordPress sites, I realized that the WordPress htaccess rules for permalinks had changed. For many years and versions, the htaccess code that enables WordPress permalinks went unchanged, resulting in an almost sacred set of htaccess directives. Here are the original permalink rules as currently provided at the WordPress
-
73 readersRecently we had a client who wanted to change their Permalink structure from
Old Permalink structure: /%author%/%category%/%postname%/
to:
New Permalink structure: /%author%/%category%/%postname%/%post_id%/
so that they would qualify for Google News. Apparently you need at least 3 digits in your URL in order to qualify for Google News.
I wanted to simply change the Permalink structure by going to Settings>Permalinks in
8183 readersThere are still some third-class web hosters who do allow the .htaccess files … and turn off the standard module mod_rewrite. But without mod_rewrite, WordPress cannot use pretty permalinks, right? Wrong!
There’s another directive we can use: ErrorDocument.
ErrorDocument 404 /index.php
This will do almost the same as the rewrite rules WordPress offers. It will not work with
4858 readersOne of the new very interesting things in WordPress 3.0 are individual post-types you can implement with little effort. Back then, you had to expand the database and write your own interface for it, now you just have to add a few lines of code - of course this is just the current state, which
5206 readersThe ultimate guide for understanding, creating, and using custom post types with WordPress.
-
7897 readersToday I would like to show you, how to assign CSS classes to custom post types for styling your website. Basically we just extend the function body_class() of WordPress with our own post types, so that we can address them to style our design accordingly.The same I had already explained in detail in another
8425 readersThe WordPress community is buzzing with excitement over the soon-to-be-released WordPress 3.0. Currently in Beta 2 now, WordPress 3.0 will have a lot of exciting new features , such as a new default theme and better menu management. Quite possibly the most exciting of these features is custom post types. In this tutorial, we’ll talk
7503 readers
PHP
add_filter( 'getarchives_where' , 'ucc_getarchives_where_filter' , 10 , 2 );
function ucc_getarchives_where_filter( $where , $r ) {
$args = array( 'public' => true , '_builtin' => false );
$output = 'names'; $operator = 'and';
$post_types = get_post_types( $args , $output , $operator );
$post_types = array_merge( $post_types , array( 'post','CUSTOM_POST_TYPE_NAME' ) );
$post_types = "'" . implode( "' , '" , $post_types