Add a background image for Custom Post Type archives page
My issue is resolved with this plugin “Categories Images”
My issue is resolved with this plugin “Categories Images”
wrong media url in wordpress
When sale price is 0.00 show only regular price
Resolved in a completely different way. Googled this, so technically not my own answer, but does the job: // ACF upload prefilter function gist_acf_upload_dir_prefilter($errors, $file, $field) { // This filter changes directory just for item being uploaded add_filter(‘upload_dir’, ‘gist_acf_upload_dir’); } // ACF hook, set to field key of your file upload field add_filter(‘acf/upload_prefilter/key=field_5b2b0326ea0e1’, ‘gist_acf_upload_dir_prefilter’); // … Read more
Can’t upload image using media_sideload_image
Alright so I feel rather stupid now, especially because I have found the solution to my own problem right after posting my question here, but also because I would have found it much earlier had I properly debugged my page (implemented a way to look at return error codes). Anyways… As stated in my EDIT … Read more
Why is the temporary upload always 4.1K
Problem solved. I really don’t know how, but a simple javascript, that was executed in frontend only, was affecting the image loader. I removed it.. all works fine (I hope!)
Custom Post Type Video – Online/Offline
You can use sanitize_file_name hook for this. function my_sanitize_file_name( $filename ) { $chars_table = array( ‘ ‘ => ‘_’, ‘-‘ => ‘_’, ); $friendly_filename = preg_replace( array_keys( $chars_table ), array_values( $chars_table ), $filename ); return strtolower( $friendly_filename ); } add_filter( ‘sanitize_file_name’, ‘my_sanitize_file_name’, 10 ); It will also convert letters to lowercase to avoid conflicts on … Read more