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
- warning: trying to access array offset on value of type bool ACF field image group
- Uploading images via ACF update_field function
- Missing feature image link function
- What’s the difference between home_url() and site_url()
- Remove “Category:”, “Tag:”, “Author:” from the_archive_title
- get_template_directory_uri pointing to parent theme not child theme
- How to customize the_archive_title()?
- remove empty paragraphs from the_content?
- What is the “with_front” rewrite key?
- Why use if function_exists?
- How to override parent functions in child themes?
- wp_enqueue_script was called incorrectly
- Add multiple custom fields to the general settings page
- Ajax call always returns 0
- 400 bad request on admin-ajax.php only using wp_enqueue_scripts action hook
- How long does a deprecated function live in core?
- Solution to render Shortcodes in Admin Editor
- How to add a data attribute to a WordPress menu item
- What’s the difference between esc_html, esc_attr, esc_html_e, and so on?
- remove_action on after_setup_theme not working from child theme
- plugins_url vs plugin_dir_url
- Remove type attribute from script and style tags added by WordPress
- How to run a function every 5 minutes?
- Best way of passing PHP variable between partials?
- Upload Multiple Files With media_handle_upload
- How to display custom field in woocommerce orders in admin panel?
- Adding fields to the “Add New User” screen in the dashboard
- Issues with title-tag and document_title_parts
- How do I get the current edit page ID in the admin?
- How to check if a user exists by a given id
- Why isn’t is_page working when I put it in the functions.php file?
- Add tags to the section via functions.php
- Add image size if page template
- How to create a custom order status in woocommerce!
- Remove Actions/Filters added via Anonymous Functions
- Adding a second email address to a completed order in WooCommerce [closed]
- How to load parent_theme functions.php before child_theme?
- How to load scripts/styles specific for a page
- Programatically add options to “add new” custom field dropdown
- Is there any global functions.php file which works for any theme?
- Excluding iPad from wp_is_mobile
- When should you, and when should you not, use wp_list_pluck()?
- Get the ID of the page a menu item links to?
- Add container to nav_menu sub menu
- Difference between the_permalink() and get_permalink() function
- What’s the difference between WordPress random_int() and PHP built-in function random_int()?
- Child theme – Overriding ‘require_once’ in functions.php
- Changing the post date and time with function