$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
- Remove Actions/Filters added via Anonymous Functions
- Use AJAX in shortcode
- How to influence the information displayed on widget inside wp-admin
- Filter the query ONLY for the search results page
- How to add attributes to a shortcode
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Using add_filter() in Widgets
- Is it possible to use a forgot password url filter?
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Edit the_content function
- How to override WordPress registration and insert an auto-generated username?
- Override a class function to include a custom template
- Make WordPress size and name images for Retina.js
- Pinterest Integration Using functions.php
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- str_replace function in theme
- Shortcode pagination not advancing
- Having issues with a foreach inside of a shortcode with ACF gallery
- How to add nav menu items to a specific position within a menu
- Disable auto-resizing of uploaded images, but only for certain filename
- Add to cart php not working [closed]
- Is possible add icon in title posts only in specific tag?
- create filter in functions.php
- Change label for registration Fields
- Insert image in WordPress with HTML5 tag and caption function
- How to construct function for applying filter?
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- Adding an external HTML link to a post thumbnail
- woocommerce change currency per category [closed]
- Multisite 404 on pages – rewrite error breaks database
- Redirect to another page using contact form 7? [closed]
- Help With Creating Shortcode
- Make wp_link_pages() suitable for Twitter Bootstrap markup
- Trying to register script in footer
- Setting a default text for excerpts of a particular category
- Add_filter when value is no variable?
- Shotcode argument issues
- (Woocommerce) Order by price when entering specific category
- Exclude category from shortcode
- How to edit classes in body tag?
- Adding an option to a shortcode
- Possible to hook into Media Library preview File column and use a custom image?
- Woocommerce checkout field
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- Tracking the number of shortcodes for a list?
- Need a method to prevent WP from adding in between my shortcodes
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )
- Functions Filter Question [closed]
- How to create a shortcode out of a php function
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- call wp_insert_user in custom class doesnt work
- Shortcode of a function
- Changing the text of Upload/Insert on Posts and Pages Screen
- How to add a shortcode to call a function
- How can I call a PHP function inside a hardcoded shortcode?
- Get URLs for AJAX Filter Checkboxes WordPress
- Using One Function To Create Two Different Shortcodes
- Is it possible to create a shortcode to link to a specific post/page where the tag is just an attribute?
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- Pagination not working – FrontPage
- Allow user select role in wordpress default registration without plugin
- page shows short code not output
- Function to function shortcode help [closed]
- post value to function with Ajax and jQuery
- I want to display the sku in the product pages of my EDD website
- Prevent function from triggering on current page
- use add_action in a shortcode (gravity form – WordPress)
- Assign IDs to headings in ACF using functions.php
- Shortcode displaying outside the div [duplicate]
- Redirect specific author posts to another url
- Shortcode with pagination advancing multiple queries
- Get shortcode attribute value to another function
- How to retrieve image IDs from shortcode content?
- How To Show Shortcodes In WordPress Custom Fields?
- previous_post_link inside of a function?
- Search and Replace Script Loader in Head Only Works in Footer
- Print all inline styles to head
- How to display data from custom fields in my custom shortcode?
- restrict access to specific urls on a specific period of time
- Function Reference for custom link in Admin Menu Management Page
- Add title & subtitle to shortcodes
- Display function from functions.php in tag.php