[wp-hackers] Another cooky question about permalinks

scribu scribu at gmail.com
Sun Dec 28 20:23:24 GMT 2008


I'm developing a photoblog using WordPress and I have succesfully changed
the author base from "author" to something else using this code:

add_action('init', 'replace_author_base');
function replace_author_base() {
        global $wp_rewrite;

        $wp_rewrite->author_base = 'photographer';
        $wp_rewrite->flush_rules();
}

Having the permalink structure set to "/images/%post_id%", i get this sort
of URL for author pages:

http://example.com/images/photographer/name

My question is: How could I make the /images/ part apear only for single
posts and not for category or tag or author pages?


-- 
http://scribu.net


More information about the wp-hackers mailing list