How to change archieve frequency of the media file in uploads folder for wordpress blog

Assuming you want to set your weekly changing subdirs like, eg ‘2013/W35’ /where 35 stands for 35th week of 2013 (‘W’ param of php date() function), you can use: add_filter(‘upload_dir’, ‘set_folder_to_week’, 999); function set_folder_to_week ( $upload_data ) { $y = date(‘Y’); $w = ‘W’ . date(‘W’); $subdir = “/$y/$w”; $dir = $upload_data[‘basedir’] . $subdir; $url … Read more

Stylesheet being loaded outside of

The two stylesheets is only loaded when a video or sound was included in a post or page and that happens after wp_head. But do not despair! There is a filter you can use! in the code it looks like this: apply_filters( ‘style_loader_tag’, “<link rel=”$rel” id=’$handle-css’ $title href=”https://wordpress.stackexchange.com/questions/115412/$href” type=”text/css” media=”$media” />\n”, $handle ); so i … Read more

Add SWF file to wordpress through custom template

wordpress is not alowing me to upload the swf file into the media library Actually you can insert this code to the functions.php: add_filter(‘upload_mimes’, ‘add_custom_upload_mimes’); function add_custom_upload_mimes($existing_mimes){ $existing_mimes[‘swf’] = ‘text/swf’; //allow swf files return $existing_mimes; } Then you try to upload your swf file to the media library. As for homepage, you can install a … Read more

Set Featured Image not opening – Stuck at loading

If this is still a problem, then you can find my answer on wordpress.org’s support forum, it might help: wordpress.org/support/topic/resize-failure-on-some-images-with-odd-message This is a part of a code from the jQuery library, to be specific this part is responsible for handling callbacks. It is displayed, because the reponse from wordpres is unparsable JSON data. If you … Read more

Reattach media after moving to another server

When you use the importer it should prompt whether to download any media/attachments it finds in the posts. If you don’t say yes, they will not be added to your Media database. To my knowledge, even if you do say yes, Featured Images are not included. It’s a very rare instance that I recommend using … Read more

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