What happened to the media manger?

The answer is obvious: no, you can’t. Why? Because there is no folders in database for media attachments, all media files are stored as single row in wp_posts table. I suppose it does not really matter where your media files are stored, it could be your hosting or CDN network, somebody else hosting, etc 🙂 … Read more

Better wordpress attachment query than this

I don’t have the data to test so the code below may be wrong. add_filter(‘posts_search’, ‘set_is_tax_to_true’ ,10,2); function set_is_tax_to_true($search,$query){ $query->is_tax = true; } $args = array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1, ‘post_status’ => ‘pending’, ‘post_parent’ => $post_id, ‘order’ => ‘ASC’, ‘orderby’ => ‘ID’, ‘meta_query’=> array( array( ‘key’ => ‘cp_sys_expire_date’, ‘value’ => current_time(‘mysql’), ‘compare’ => … Read more

Replace post/page titles with an image in WordPress

I would actually handle this with CSS. In your style.css file add something like this: .page-title h1 { text-indent: -9999px; background: url(images/your_logo.png) 10px 10px no-repeat; height: 100%; } You’ll then make sure that your logo is added to your theme’s images folder. Also, adjust the size of the image accordingly, or you can also adjust … Read more

Does WP create multiple images?

WordPress shows whichever image is requested by the function that outputs those images in the template. The presentation of images is entirely up to the theme developer, WordPress doesn’t make this decision on its own. For example, the_post_thumbnail function: the_post_thumbnail(‘thumbnail’); // Thumbnail (default 150px x 150px max) the_post_thumbnail(‘medium’); // Medium resolution (default 300px x 300px … Read more

Time Based change of image

I believe you’re using the wrong function. get_the_time() doesn’t actually return the current time but instead the time of when the post was published. Maybe what you’re looking to use is date( ‘H’ ).