How to turn off pages for user uploaded files?
How to turn off pages for user uploaded files?
How to turn off pages for user uploaded files?
is_single function checks for $wp_query global variable is loading single post of any post type or not , $wp_query is set after running query_posts function that loaded after wp action hook. So you should call this function in the right order ( hook ) add_action( ‘wp’, ‘include_single_lazy_load’ ); function include_single_lazy_load() { if( is_single() ) { … Read more
Unlike jpg, pdf, and png files, dcm files, by default, aren’t allowed to be uploaded by WordPress. You can add them to the allowed list using the upload_mimes filter: add_filter( ‘upload_mimes’, ‘wpse409071_allow_dcm_uploads’ ); function wpse409071_allow_dcm_uploads( $mimes ) { $mimes[‘dcm’] = ‘image/dicom’; return $mimes; } (I found the MIME type here: https://www.file-extensions.org/dcm-file-extension. You might need to … Read more
(Converting my comment to an answer.) Since you store themes and plugins in that folder as well, try setting the WP_CONTENT_DIR constant instead. (Always prefer absolute paths when possible.) As to your specific case, why it worked in one file but not in another – this will probably involve more debugging, checking where exactly WP … Read more
Doing this in vanilla WordPress using hooks requires code that hasn’t been released yet, specifically: https://core.trac.wordpress.org/changeset/53751 https://core.trac.wordpress.org/ticket/55443 That Trac ticket adds new filters which are available in WordPress 6.1. Note that if your server cannot process webp images for resizing then webp will not work for you even with these filters. You will need to … Read more
I want to customize wp.media (the wordpress admin uploader) in order to change the file name but only in video custom post type
Retroactively change Permalinks for media files after disabling year/month format
The code you have added has an undefined constant which might create an issue with the latest PHP versions. Instead, you may use the code given below which will allow you to add media to the short description and description. add_filter(‘dokan_product_short_description’, ‘add_media_button’); add_filter(‘dokan_product_description’, ‘add_media_button’); function add_media_button(){ return array( ‘media_buttons’ => true ); } After adding … Read more
In /wp-content/themes/centric-pro/style.css, delete line 88 through line 113 this removes all the font-face declarations. On line 88 paste the following: @font-face { font-family: ‘GothamRounded-Bold’; font-style: normal; font-weight: 400; src: url(‘fonts/GothamRounded-Bold.eot’) format(’embedded-opentype’), url(‘fonts/GothamRounded-Bold.otf’) format(‘opentype’), url(‘fonts/GothamRounded-Bold.woff’) format(‘woff’), url(‘fonts/GothamRounded-Bold.ttf’) format(‘truetype’), url(‘fonts/GothamRounded-Bold.svg#GothamRounded-Bold’) format(‘svg’); } @font-face { font-family: ‘GothamRounded-Light’; font-style: normal; font-weight: 400; src: url(‘fonts/GothamRounded-Light.eot’) format(’embedded-opentype’), url(‘fonts/GothamRounded-Light.otf’) format(‘opentype’), url(‘fonts/GothamRounded-Light.woff’) format(‘woff’), … Read more
Please check you file size first, if it’s too large or heavy wait. it will take time. by default WordPress upload file size limited to 2MB only, so you have to upload less than it or you have to increase the upload file size limit.