$return_string .= get_the_post_thumbnail();
should be:
$return_string .= get_the_post_thumbnail( get_the_ID() );
Related Posts:
- Problem in shortcode outputting content
- Adding body class when post contains a specific shortcode
- Super simple shortcode not working
- Display post shortcode content in the sidebar?
- How to filter $content in shortcode function
- Native gallery custom html output
- Customizing the wp_video_shortcode output with add_filter
- Hide disclaimer from summary excerpts
- Shortcode to eliminate and replace with
- Regex works in regexr, but not if I filter content [closed]
- Trying to get this function to show below the content
- How can I add a filter for specific categories on functions.php?
- Use html inside shortcode function
- How to add custom JavaScript in functions?
- Setting a default text for excerpts of a particular category
- How to edit the Tags within the image file URLs?
- How would I go about replacing this function in my child theme located in inc/template-tags.php
- Retrieve a value from Yoast SEO to use to set a default twitter card image honoring overrides
- Can’t properly set the_title add_filter to show short_URL
- Add_filter when value is no variable?
- How to add_filter html template to middle of content
- Shotcode argument issues
- Shortcode parse error – wrong syntax
- (Woocommerce) Order by price when entering specific category
- Filter an WordPress Function in (general-template.php)
- Exclude category from shortcode
- wp_nonce_field is breaking form for reasons unknown
- If user is logged-in display/hide something
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- get_pages() Returns Only One Item
- Redefine function arguments before rendering
- Function shortcode – Set Parameter
- How to edit classes in body tag?
- Adding an option to a shortcode
- Is there a way to direct unregistered user to registration page when click a link?
- How to use author meta in shortcode?
- Using multiple line variable inside a function?
- Testing for a shortcode using a function. 404 page throwing PHP Notice
- Use a shortcode to display custom meta box contents
- Tags break custom Excerpt function
- Echoing function into WordPress NextGen gallery
- Output loop to function return?
- How to echo the value of an array element using a function via a shortcode
- Filter nav menu items HTML tags and wrap inner text with span
- Wp-query Order By problem
- Possible to hook into Media Library preview File column and use a custom image?
- How can I add a class to a nav li depending on URL?
- Modify gform_other_choice_value for specific form and specific field in Gravity Forms
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- Combine embed_oembed_html and oembed_result
- login_headertitle is deprecated since version 5.2.0
- Set “woocommerce_is_purchasable” to false for specific “$product->is_stock_status”
- Woocommerce checkout field
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- Adding additional roles on registration
- Filter to wp_list_authors
- How to add custom li item to wordpress menu
- How to include any template using Shortcode fuction?
- How can I pass a shortcode value to the head in wordpress functions.php
- Need to convert image url to a Base_64 data url with wordpress function..
- The_content and Preg_replace in loaded Iframe [closed]
- dynamic site link for future migration in echo do_shortcode()
- How to create shortcode with html and php content?
- Tracking the number of shortcodes for a list?
- Need a method to prevent WP from adding in between my shortcodes
- using enqueue_script in a shortcode isn’t working
- Can’t change excerpt length and more tag
- Run function from parent on child site
- Function Reference for custom link in Admin Menu Management Page
- Force resize for all video content
- Way of getting queried loop before the query with a filter hook?
- Gallery Shortcode Function Help
- How to Insert A List of Posts in A Category Written by the Author into the Author Archive
- Add title & subtitle to shortcodes
- Echo custom field value in shortcode function
- Shortcode Variations?
- Shortcodes not outputting in correct divs
- shortcode inside post called by ID does not render as expected
- Custom shortcode not being included in content paragraph [duplicate]
- trouble with passing class method data to outside function
- Filter to strip unnecessary attributes
- Integrating custom API for post content into Admin interface & Public Website [closed]
- Get term count on a category page
- How do grab the main loop, with conditions, and output via shortcodes
- Help finishing script to export WP user data when form submitted
- Display function from functions.php in tag.php
- Creating mixture of shortcodes to use in the visual/text editor
- PHP error in shortcode [closed]
- multible shortcodes (for differnt values) with one function
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- function to show youtube videos within excerpt – if condition and apply_filters
- How can I modify or filter this variable in an existing class? (Mai Theme)
- get last part of page url and add it as cat in wp_query
- Apply function only for specific post
- Overriding an existing filter
- disable a specefic sidebar when user is log out
- post_content return zero!
- How to make my logged-in user-role shortcode displaying name instead of slug?
- Remove Actions/Filters added via Anonymous Functions