wordpress doesnt add media.css file

/css/media.min.css?ver=4.8.1 is not indicative of a “min version”. The filename of this CSS file is LITERALLY: ‘media.min.css’. (Additionally the file is versioned with the ver parameter set to 4.8.1). So atetmpting to enqueue: wp_enqueue_style(‘media’, get_template_directory_uri().’/css/media.css’); Will certainly fail, and should in fact be: wp_enqueue_style(‘media’, get_template_directory_uri().’/css/media.min.css’);

Get the Playlist embedded in Post/Page content

The get_media_embedded_in_content() uses a regex to match the input tags, but the HTML for playlists is not made from a single tag, instead it’s constructed with tags like <div>, <script>, <noscript>, <ol>, <li>. Recently I posted an answer to get post playlist like get_post_gallery() that you can check out, to see if it helps. It … Read more

Disable wordpress gif compression?

There are two main concerns with using animated gifs in WordPress: dimensions and file size. When you upload a gif file to the media library, WordPress stores the original file and additional files for different sizes ( medium, thumbnail ). Gifs of other sizes will be stored with one frame of animation only, so they … Read more

Load media from another URL on a multisite install

I found a solution on Stack Overflow. So I added the following to .htaccess Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^wp-content/uploads/(.*) http://their-domain.com.com/wp-content/uploads/$1 [R=301,NC,L] This replaces all references to the local uploads folder with a remote uploads folder on the fly and I see images on my local dev area without having to download 30GB+ … Read more

Why does my media selection script write to ONLY the first input field?

this problem is because of the first “if”, the good text field in only set the first time to change that, you can add a “data” arguement in HTML and change the JavaScript code like that (look the modification in meta_image_frame.on(‘select’…) (function($) { ‘use strict’; $(function() { var meta_image_frame; function saveImage(e, uiElement) { e.preventDefault(); if … Read more

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