Hope this code may be help you
<?php
/*
* Add columns to event post list
*/
function add_acf_columns ( $columns ) {
return array_merge ( $columns, array (
'event_date' => __ ( 'Event Date' ),
));
}
add_filter ( 'manage_events_posts_columns', 'add_acf_columns' );
/*
* Add columns to event event list
*/
function events_custom_column ( $column, $post_id ) {
switch ( $column ) {
case 'event_date':
$event_date = get_post_meta ( $post_id, 'event_date', true );
echo $fDate = date("d-m-Y", strtotime($event_date));
break;
}
}
add_action ( 'manage_events_posts_custom_column', 'events_custom_column', 10, 2 );
?>
Related Posts:
- Get list of years when posts have been published
- functions.php inject inline css
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- Date/time limitation of posts where function must be executed
- How to use max and min values of custom fields
- Individually styling date month year [closed]
- Retrieve tags data in post body
- Run function when WordPress new multisite is created or ACF field is updated
- Having issues with a foreach inside of a shortcode with ACF gallery
- Ordering posts by publish date not working?
- How do display most popular post from a year earlier to the day?
- Updating Media Published Date When Parent Post Is Modified in WordPress
- Get Current Post ID in functions php, meta query filter
- ACF not showing
- How to retrieve the values of a sub-field in the first and last row of an (ACF) repeater inside function?
- Add php code to wp_print_scripts?
- Access category within rss2_head hook?
- Can set_post_thumbnail be used to remove a thumbnail?
- Remove the month and year from a WordPress Date?
- Programmatically add Yoast meta description after post save
- Compare meta key to current date in pre get post
- Using two loops in one WordPress template
- How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
- Insert a field with PREG_REPLACE – strange behaviour
- Getting images from media library and get_the_date() not working
- WordPress show bad the php hour and date
- Perform function on publish AND save (not just save)
- Changing date query from month
- Display ACF category image on archive and single template files
- wordpress built-in Jalali date convertor
- Featured Image and Tags problem
- Override a Post’s URL with Advanced Custom Fields Function
- WordPress Function Assistance with Loop
- How to show ACF value under post/page title in wp-admin
- How to display an image before title text in menu items
- Filter works on last selection but no others
- How to update an image attachment’s alt text from a custom field when saving a post?
- Help with with my function for wordpress
- Assign IDs to headings in ACF using functions.php
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- get_field() with ID in one signal filter not working
- Echo a String Based On Geolocation? [Woocommerce || ACF]
- Comment function for page
- ACF Filter return value
- Return ACF Field value function
- Providing fallback function and allow override by plugin
- Different body image backgrounds on different pages, posts and categories
- update_post_meta not working in function
- does acf_save_post cause endless loop?
- Call ACF data from functions.php [closed]
- Change Post status based on custom field date +1 day
- Update post meta with wp cron
- Uploading images via ACF update_field function
- How to use the do_action () with parameter
- Extending the site search to include a single custom field
- Notify users whenever a new post is published based on their preference
- Remove Header and Footer in iframe
- How to set global variables in template page?
- Setting featured image with function, 1 part not working
- Comments to only be seen by their author
- Remove function or filter
- options.php problem – data not saved
- Filtering posts by category name based on page’s slug
- adding custom classes for tables
- Load parent theme files before child theme functions.php
- CSS for menu item added via functions.php
- How to validate this deprecated function
- How can I modify all existing tags while keeping the urls themselves?
- Scripts not appending to element in AJAX call – why?
- Trigger a custom function when option are saved in admin area
- How would I add “edit profile” and “blog post” functions to front-end?
- Unable to return values from function
- How to convert raw url to hyperlink?
- Split single-review.php to two parts
- The work of WordPress Function update_post
- how can I change all wordpress media file url to custom cdn url?
- Changing the HTML of notices in WooCommerce [closed]
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- function class doesnt work
- How to add a cron job in my functions.php
- Form output outside of container
- Additional folder where will Media Library look for files
- How do I add schema markup to individual WordPress posts without using plugins?
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- WordPress Custom wp mail template return full template
- Comment turned Invisible
- How do i set global variable in a function in wordpress functions.php
- Working function() doesn’t execute when triggered by WP CRON
- WordPress – Notice: Function wp_enqueue_script was called incorrectly
- How to add more than one menu for logged in members?
- post_row_actions filter from parent theme not executing in child theme
- How to get variable from other function inside class function using add_action for Ajax call
- BuddyPress Edit activity function good practice
- wp_login_form display no styled form
- Would it be possible to disable embeds for specific user roles? If so, how?
- I am looking for a function to create category links in the wordpress loop for articles
- Apply function only for specific post
- Second featured image only shows in metabox preview after saving a post in the wordpress editor
- i recently bought a theme and when i try to activate it says (It appears wp_remote_get() function is disabled in your server. )
- No src and sizes attributes present on WordPress thumbnail images; the smallest image size is loaded irregardless of viewport size