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
- How do I change/modify the_post_thumbnail(); html output?
- Featured image shortcode
- Is there a way to parse shortcodes in PHP?
- Using file_exists to check file in Uploads
- Display sorting options dropdown when using WooCommerce product category shortcode
- Retrieve multiple values passed to a single attribute in a shortcode
- Rename image uploads with width in filename
- Export User Info to CSV from Front End
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- Add/echo div with Analytics-Code to function in functions.php
- Change Width of Featured Image Thumbnail on Add/Edit Post Page
- How to check for WordPress timezone type?
- Use Timber/Twig to pull an image by image ID [closed]
- Adding graphics to 404.php page
- Strip Image Classes from HTML Output
- Additional image sizes are not being generated
- How can I default to all WordPress roles when parameter is not included in shortcode?
- PHP contact form returns warning in text widget [closed]
- Adding a querystring to an image URL when clicking ‘insert into post’?
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- How to insert a local image with custom size
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Recent post display using shortcode
- Convert a date to ISO8601 date format
- Need to turn this php into WP shortcode
- Theme currently showing thumbnails, how to show full size?
- Validate Uploaded Image using WordPress’ Built-in Functions?
- custom shortcode will not display the wrapped content
- How do I let users upload files to a chosen location?
- Trigger popup in a php if/else statement
- Append HTML Using Shortcode
- add_image_size for header_image
- How to output a PHP file values by shortcode?
- Set the background to a default image if there isn’t a specified “featured image”
- How to control WordPress image metadata (using Imagick)?
- Can’t upload image using media_sideload_image
- How to use thumbnail size of image if I’m only using src to get image
- Enable custom logo upload if logo is not in header
- Shortcode to show the code
- Multiple do_shortcode in page template
- Find hours between post_date and post_date_gmt
- Resize image to specific dimension (X to Y ratio)
- $wpdb returns duplicate posts
- Shortcode to find and replace URL
- 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
- 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
- What is the difference between Null vs Empty (Zero Length) string?
- foreach repeat html structure after every nth for attachment [closed]
- how to show images without passing it to timthumb.php file for resizing
- MySQL Query Returns Array () In Shortcode
- How to work Woocommerce pagination inside shortcode?
- How to get woocommerce orders with get_posts method in a shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- not outputting medium size image URL
- How to pass parameters in wordpress shortcode?
- Display a custom name when the user has no name settle in his account
- Echo short code syntax
- How to return html as a string from php for WordPress
- Changing Date Format on Custom Meta Data w/shortcode call
- 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
- How can i iterate through this shortcode array?
- 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
- 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
- Retrieve first image url from custom post with pagination
- 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
- Shortcode to include PHP file, pass various parameters to include?
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- Is there a better way to output HTML as a shortcode?
- Understanding responsive imagery
- HTTP 500 Error after Creating Shortcode
- Convert custom field date format to “WordPress default”
- How to execute a shortcode within a custom field?
- PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in Stack trace:\n#0 [internal function]: img_caption_shortcode()