This code requires both a width greater than or equal to 1, and a caption. You could try removing these lines:
if ( $atts['width'] < 1 || empty( $atts['caption'] ) )
return $content;
That may affect other functionality, but it is the point where the script skips the image entirely.
Related Posts:
- PHP code to call image Caption, Alternative Text, and Decription?
- Not able to remove caption shortcode from the content
- Replace background image with post thumbnail in shortcode
- How to add a PHP scripts into WordPress
- Display Current Time using shortcode
- Adding caption to all images inside an article
- Return HTML Template Page with PHP Function
- How to add a class to the attachment images
- Change the filename format of saved featured images
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- ob_get_clean returns empty string, ob_get_flush outputs string
- Export User Info to CSV from Front End
- Add custom image sizes to media uploader
- Why does this echo values in the wrong order?
- Add/echo div with Analytics-Code to function in functions.php
- Use Filename for Alt and Title Tags
- WordPress returns a wrong date
- How do I hardcode a WordPress shortcode into my theme?
- Add custom HTML to posts page
- Strip Image Classes from HTML Output
- Additional image sizes are not being generated
- How to return multiples lines in a shortcode?
- Change logo based on incoming domain
- How do I turn a shortcode into PHP code?
- wrong php date()?
- How to return a foreach inside a shortcode
- Validate Uploaded Image using WordPress’ Built-in Functions?
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Shortcode content output but not in correct place
- Auto crop images in WordPress
- PHP code inside shortcodes
- Append HTML Using Shortcode
- Recent posts with featured image or fallback image with permalink
- Set the background to a default image if there isn’t a specified “featured image”
- Mass update excerpt
- Pass php dynamic variable to shortcode
- do_shortcode with custom field
- “imagejpeg” function is not working in wordpress
- Remove echo from shortcode
- Shortcode to show the code
- Get URL from shortcode tag
- Multiple do_shortcode in page template
- Which function crops images in wordpress?
- $wpdb returns duplicate posts
- Shortcode to find and replace URL
- Could use some help with Shortcodes
- How to put a form with php code into a variable or shortcode?
- Shortcode to embed Edit Account form not working
- Handling PHP/HTML inside the output of a shortcode function
- I’m unable to call img path using single quotes in an array?
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Get the id of all images in a post
- Shortcodes showing in excerpt despite using strip_shortcodes
- Calling PHP Titles inside Javascript Markup
- Generate responsive post thumbnails of same size
- How to get my [shortcode] rendered on the home page, other pages are fine
- Comparing Dates from custom field
- MySQL Query Returns Array () In Shortcode
- How to get woocommerce orders with get_posts method in a shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- Trying to create a shortcode to display categories with a specific product tag
- Change the URL of an image from wp_get_attachment_image_src for Product Posts based on Category
- not outputting medium size image URL
- How can I prevent a shortcode div from extending beyond its boundaries?
- Where Do Image Dimensions Get Added To A Filename?
- Adding variable in WordPress shortcode
- Execute Shortcode in Textfile
- Echo short code syntax
- custom taxonomies not working
- How to return html as a string from php for WordPress
- Changing Date Format on Custom Meta Data w/shortcode call
- Featured images duplicating and replacing next image
- Add the shortcodes from the enfold theme to the other theme
- How to create an unordered list of images separate from the content
- Offset with ajax load more posts duplicates
- Ordering / grouping posts by datepicker ACF
- How can i iterate through this shortcode array?
- Array sorting assistance
- Shortcode in a $output statement
- Need help with PHP functions
- When using shortcode, content stops generating after the_content
- PHP Shortcode – 500 error
- Run PHP Results inside WP Shortcode
- Shortcode At top of Page – PHP 5.5 vs 5.4 – ob_start();
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- On selecting shortcode generate selected shortcode table inside page editor worrdpress
- Using the same shortcode to show any table from the database
- Shortcoding with Divs
- Can i show items based on the day with php?
- Determine if only one image attached to a post/page
- upload images on front by user using form
- PHP-Code inside Href-Tag
- My title is showing after the shortcode
- Adding slides to an existing carousel manually
- Where to store the images of a custom WordPress theme?
- Shortcode to include PHP file, pass various parameters to include?
- Redirect loop upon installation of my plugin
- How Create Automatically Image jpg.webp from image .jpg without delete or change original images upload
- How can add alt tag in following code. Image are showing dynamic in wordpress