Media Upload Directory to MMYY instead of YYYY/MM

/** Force wp_upload_dir() to use time-based paths. */ add_filter( ‘pre_option_uploads_use_yearmonth_folders’, ‘__return_true’ ); /** * Use the date format MMYY instead of YYYY/MM in the uploads path. * * @param array $dir * @return array */ function wpse_104005_upload_dir( $dir ) { if ( preg_match( ‘!/([0-9]{4})/([0-9]{2})!’, $dir[‘subdir’] ) ) { // Check we do indeed have a … Read more

How do I make a copy of WordPress to other folder

If you want to move wordpress you should this: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory I guess you want to create a development environment, and because you never edit core files of WordPress you don’t have to copy WordPress itself because the only thing you are changing is the theme folder. And you don’t want to install WordPress a second … Read more

How can I set up a completely separate (not multisite) WordPress installation as a subdirectory of an existing WordPress blog?

I decided to move the child installation to the main site’s web root, and rename its subdirectory to intranet. Once I had done this, all I had left to do was place this line of code after the main site’s rules: RewriteRule ^intranet/ – [L] The – rewrites the URI to itself – thus overriding … Read more

AZ Directory category

I wrote a tutorial on Creating an Alphabetical Glossary of Posts but here are the most relevant parts. First create a hidden taxonomy for the letters of the alphabet // Add new taxonomy, NOT hierarchical (like tags) function kia_create_glossary_taxonomy(){ if(!taxonomy_exists(‘glossary’)){ register_taxonomy(‘glossary’,array(‘post’),array( ‘show_ui’ => false )); } } add_action(‘init’,’kia_create_glossary_taxonomy’); Then when any post is saved, save … Read more

Directory location of new page

WordPress does not create a new file in the filesystem when you create a page from the backend. The data you enter into the backend is saved to the MySQL database where it is retrieved by various and sundry queries and displayed by code in one or more templates. There is no “directory location” for … Read more