Try with change line to date('d-m-Y',strtotime($current_user->delivery_date)) ;
function delivery_date( $atts ) {
global $current_user, $user_login;
get_currentuserinfo();
add_filter('widget_text', 'do_shortcode');
if ($user_login)
return date('d-m-Y',strtotime($current_user->delivery_date)) ;
}
add_shortcode( 'delivery_date', 'delivery_date' );
echo do_shortcode('[delivery_date]');
Related Posts:
- Calling PHP Titles inside Javascript Markup
- Place page title in header?
- Shortcode to insert
- Shortcode putting html such as
- How to get year, month and hour in WordPress?
- How to return a string that has a variable inside in a shortcode?
- Using Echo in ShortCode – Stuck
- Multiple do_shortcode($content) within one shortcode
- Adding Image Count to Multigallery
- My shortcode is showing up twice
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- WordPress menu deletes when trying to add a hook
- Unable to set right time in admin and frontend template
- How to find the output of contact form 7 shortcode? [closed]
- How do i get (unique) page name?
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Browser title script ignoring is_page /else conditional [closed]
- Nested shortCode functions in the functions.php file
- get_page_by_title with an apostrophe in variable
- Making Quote Plugin more efficient
- How to limit the content coming from wordpress shortcodes?
- How can I get content inside one shortcode to another shortcode?
- Use WP_Query in shortcode
- Create shortcodes within foreach loop (using array)
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Print last modified date only on posts
- How can I dynamically update the class in my shortcode?
- Creating own shortcode – echoeing php variable based on JS variable
- How create a Shortcode with hover and complex options
- Remove from shortcode
- How to Reference/Echo Variable from Another PHP Function
- Replace shortcode in substring
- Only first shortcode gets executed
- echo something inside a shortcode
- displaying content that includes shortcodes within an echo
- Display Data in Table from External Database in WP using Shortcodes
- anyway to put inside a $outprint=sprintf()
- Capitalize Shortcode Value on Output
- How would I use this filter to change the output of the date format to “Twitter time”?
- Why is my str_replace not working on short code submitted by front-end?
- How to get User Time Zone in WordPress?
- Shortcode not staying inside div tag
- Line breaks inside shortcode variable
- Shortcode for Listing Users from Meta Value?
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- Shortcode to log user into current URL
- Shortcode function doesnt work without caption
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Including Custom fields within the_content
- What is the difference between Null vs Empty (Zero Length) string?
- Get date function not working
- Show Featured Image Dimensions and size frontend with shortcode
- How to work Woocommerce pagination inside shortcode?
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- Display logged in user name and lastname on page
- Display Visual Composer shortcode if a post belongs in specific categories
- is it possible for a URL to filter by tag
- Trying to create a shortcode to display categories with a specific product tag
- Issue in displaying the ongoing event and current events in the post
- How to pass parameters in wordpress shortcode?
- Replace background image with post thumbnail in shortcode
- How can I prevent a shortcode div from extending beyond its boundaries?
- Conditional formatting on data fetched from MYSQL
- Adding variable in WordPress shortcode
- Display a custom name when the user has no name settle in his account
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Execute Shortcode in Textfile
- custom taxonomies not working
- Possible to edit custom date field and display?
- Display current user metadata on WordPress page
- Add Shortcode to ::before class
- Reload page with a different shortcode when a user selects from a dropdown
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Can’t add to time? [closed]
- Shortcode’s output to use as other shortcode’s parameter
- Show products per shortcode
- WordPress change post date format from english to japanese
- Add two or multiple functions in WordPress Post or Page
- Shortcode Works for Logged in Users but Not Working for Guest
- perform mathematical operation on shortcode
- Update same content in multiple posts at once?
- Adding a number to a date
- problem multisite with blog id
- Create dynamic content from one WP page to multiple other pages
- Shortcode Display From WordPress Dashboard Page Without Using post_id
- Do_shortcode on PHP file outside theme ALMOST works
- Overwriting a Shortcode
- Custom Shortcode with Dynamic Button
- Generating a number based on post ID
- Whats wrong with my code? Need To add String to shortcode? [closed]
- A next page function with shortcode?
- Shortcode for Visual Composer Grid fails turning string to integer
- Gutenberg – render_callback does not pass ToggleControl value on frontend
- HTTP 500 Error after Creating Shortcode
- How call WordPress shortcode inside function file
- Convert custom field date format to “WordPress default”
- How to execute a shortcode within a custom field?