Protocol relative url not pulling up images on IE, FF, and OPERA
Protocol relative url not pulling up images on IE, FF, and OPERA
Protocol relative url not pulling up images on IE, FF, and OPERA
Removing image dimensions from `the_content`
WordPress Image Resize fails without Error Message
I haven’t tested this but I believe you would simply change some of the code close to the end of the snippet you posted. if (count(get_posts(“post_type=attachment&post_parent={$post_id}”))>5) $file[‘error’] = “Sorry, you cannot upload more than five (5) images.”; Let me know if this doesn’t address your needs.
get_post_thumbnail_id() is going to default to using the $post global. That global is set to each post in turn as the Loop runs, so at the end of the Loop it will be set to the last post. The easiest thing to do would be to set $image before the Loop runs, but wp_reset_query would … Read more
Your example code is calling the full size image as you mention and resizing to the dimensions you feed into the array. I’ve answered this question before here, but the basic idea is that you’ll want to use add_image_size() in your functions.php to tell WordPress you’d like it to create a new image size when … Read more
why not to use a plugin like nextgen-gallery? You can ask the plugin to scan a dir to build a gallery, then are many possibilities to display the images. If this cannot be a solution you need to access via php directly the filesystem, not difficult but some work needed 😉
I am trying to get metabox image with custom size
For everyone that is looking for an excerpt that keeps images etc in tact without using the first image function, here is the code function pietergoosen_custom_wp_trim_excerpt($text) { global $post; $raw_excerpt = $text; if ( ” == $text ) { $text = get_the_content(”); $text = strip_shortcodes( $text ); $text = apply_filters(‘the_content’, $text); $text = str_replace(‘]]>’, ‘]]>’, … Read more
So everything looks and works fine in the Backend, but doesn’t display properly in the Frontend. First thing to try is temporarily switch to one of the default themes (e.g. Twenty Fourteen) to see if it is an issue with the theme. If everything works with the default theme it is a theme issue. You … Read more