the_ID
outputs (echoes) the ID.
Use get_the_id ()
Same for the_title
..
Use get_the_title
Related Posts:
- Solution to render Shortcodes in Admin Editor
- How to display random users with avatars
- Enabling shortcodes for custom fields
- How to use get_media_embedded_in_content function
- Creating a table from shortcode avoiding wpautop for each row
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Stripping shortcode from custom excerpt function
- how to create shortcode in wordpress
- Display random text from a file with the WP built-in AJAX API
- Set first oembed in post to a global variable or function
- Formatting post content to exclude gallery
- Remove images from get_the_excerpt
- Shortcode with custom content attribute?
- Problem with extract() with custom shortcode
- Shortcode to insert menu in page body?
- Using locate-template & shortcodes doesn’t appear to work
- Displaying a random user with a shortcode
- Passing HTML in WordPress Shortcode arguments
- Adding body class when post contains a specific shortcode
- Function to show only first instance of shortcode
- creating shortcode to pull json array
- Custom Shortcode, functions PHP WP_Query loop
- Pass Shortcode Attribute to footer Script
- Super simple shortcode not working
- Detect Safari desktop browser and include the detection in a shortcode
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- Display gallery on top before content
- List child pages of specific page using shortcode
- How to extract the variables out from “add_shortcode” function?
- Display first name of logged in user?
- How to get specified parent page title in my function
- Possible to display shortcode based on the category?
- WordPress shortcode attributes for database SELECT?
- create shortcode to list users with specific meta key value
- Variable if post is sticky in functions.php
- Display post shortcode content in the sidebar?
- How to get the index number of the posts?
- Using shortcode content with nested shortcode
- How can I make a widget shortcode to control all the widgets?
- Custom shortcodes not inserting into visual composer columns
- How to filter $content in shortcode function
- Setting youtube size in functions.php
- Adding a colorbutton in tinymce dialog with current api
- Passing variable as add_shortcode argument
- Display gallery on bottom after content
- Excerpts are not displayed by a shortcode on category pages
- WordPress Shortcode function display outside of widget
- check if the user is owner of current page
- shortcode help require
- Optimizing a WordPress site
- Use html inside shortcode function
- wp_nonce_field is breaking form for reasons unknown
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- Function shortcode – Set Parameter
- Using multiple line variable inside a 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
- Wp-query Order By problem
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- How to include any template using Shortcode fuction?
- Need to convert image url to a Base_64 data url with wordpress function..
- How to create shortcode with html and php content?
- Shortcode question
- Can I include a custom PHP function in a WordPress function?
- Shortcode to get featured image of specific id post
- Modify shortcode to work with custom post types
- shorthand syntax for custom fields
- show all the posts thumbnails
- Problem with shortcode inside a shortcode
- Need help making a short code work
- Display a list of random terms from custom taxonomy with shortcode
- Load templates, pass arguments, and render output from functions.php
- Passing function arguments via a shortcode
- Customizing the wp_video_shortcode output with add_filter
- Probleme shortcode with list author
- Last updated posts shortcode in functions.php
- Shortcode to output category description by passing ID
- Help using ShortCodes to style whole chunks of the post
- Display list of pages that contain a certain string within the slug
- HowTo: Add wrapper to columns shortcode?
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- Custom shortcode with do_shortcode and substr
- Can I use a function to return HTML and the result of another function?
- Problem in shortcode outputting content
- Expanding a function to call a plugin or show a link
- Trying to the deduce shortcode from a function
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- Pull random comment from specific post, display on homepage with shortcode
- Set thumbnail from URL, by grabbing image in functions.php
- Run function from parent on child site
- Gallery Shortcode Function Help
- Echo custom field value in shortcode function
- Shortcode Variations?
- Custom shortcode not being included in content paragraph [duplicate]
- Creating mixture of shortcodes to use in the visual/text editor
- PHP error in shortcode [closed]
- multible shortcodes (for differnt values) with one function