How to replace “wp-content/blogs.dir” with “media” for attachment permalinks?

Actually … the blogs.dir part isn’t used except for internally. Let’s say you have a network with two sites – http://url.com and http://sub.url.com. The files will be located in (respectively): http://url.com/files/2011/06/… http://sub.url.com/files/2011/06/… The blogs.dir directory is where the images exist physically, yes, but your .htaccess file is routing the virtual directories I just listed above … Read more

display URL or permalink instead of page title in dashboard

Filter ‘the_title’ on the screen with the list table of your post type. The pattern for the initial hook is: manage_edit-post_type_name_columns. Sample code: // replace ‘post’ with the post type name you want to catch. add_filter( ‘manage_edit-post_columns’, ‘wpse_67171_title_to_url’ ); /** * Replace the default title with its permalink. * * @param string $title * @param … Read more

Image Attachment Url Rewrite

Ok so I found the answer. I used the code as per https://wordpress.stackexchange.com/a/56426/37472 and changed all references of ‘series’ to ‘gallery’. That added the required rewritre rule to parse a link like domain.com/landscapes/gallery/123/ to index.php?attachment_id=123. My assumption was that wordpress would display the default permalink that is generated by get_permalink() in the domain.com/landscapes/gallery/123/ format. It … Read more

What happens when permalink settings are updated?

You’re correct, when you update the permalinks, the htaccess file also updates. When you create or update a “pretty” permalink structure, WordPress will generate rewrite rules and attempt to insert them into the proper .htaccess file. If it can’t, it will say something like “You should update your .htaccess now” and print out the rules … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)