Please try this way:
Change date, the_date, the_time to get_date, get_the_date, get_the_time.
function KhmerNumDate ($text) {
$text = str_replace('1', '១', $text);
$text = str_replace('2', '២', $text);
$text = str_replace('3', '៣', $text);
$text = str_replace('4', '៤', $text);
$text = str_replace('5', '៥', $text);
$text = str_replace('6', '៦', $text);
$text = str_replace('7', '៧', $text);
$text = str_replace('8', '៨', $text);
$text = str_replace('9', '៩', $text);
$text = str_replace('0', '០', $text);
return $text;
}
add_filter('get_date', 'KhmerNumDate');
add_filter('get_the_date', 'KhmerNumDate');
add_filter('get_the_time', 'KhmerNumDate');
Related Posts:
- How to call the_time current?
- Get the blog page URL set in Options
- Using classes instead of global functions in functions.php
- What is the difference between wp_register_sidebar_widget and register_widget?
- Change admin bar to default:off
- Create “File-less” Page Template in Functions.php
- When to use esc_url, esc_html, esc_attr, and friends?
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- How to change post thumbnail title and alt attributes to post title?
- Why might $input (Settings API) be coming through empty?
- Override default cropping in WordPress [duplicate]
- Get password when user registers and save it sha1 into database
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Removing the default sidebar from admin panel
- Merging PHP download script into `functions.php`
- Is there an error in get_the_tag_list()?
- Returning Variables back into a template
- Allow users to add custom functions to wordpress theme
- How to add custom template tag in wordpress theme?
- Nesting Functions within Functions
- Is using eval() ok in this scenario
- Custom php page in WordPress theme?
- Can’t access WordPress functions in file called via Ajax?
- How can I customize wp_footer, where is the code that controls what this function does?
- How to list all images in uploads directory except those that are attached to any post
- More than one meta field in a single meta box?
- Is there a theme function for is_password_protected()?
- how do you create an admin interface in plugin for your theme
- How to determine which custom header image is being shown
- Toggle Sidebar Display
- How to store functions in… functions.php?
- Unhook jQuery from WooCommerce via `functions.php`? [closed]
- trying to use wp_handle_upload with ajax
- Should I use include or load_template for including shortcodes, plugins and so on?
- Check if home.php and set home.php as page_on_front
- Should I use add_filter for functions in function.php of the theme?
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- How can I wrap html around the output of the_time function?
- Pass variable to hook. Its possible?
- Theme Customizer not loading JS for live preview
- Remove “You are using WordPress 3.2.1” from Right Now Dashboard Widget
- Replace function in a child theme
- Custom theme, contact form 7 & fast secure form doesn’t work
- Change the “Default Avatar” admin option via functions.php
- Replace single_template filter with what for default posts?
- JQuery undefined and Stylesheet loads in bottom along with js files
- How can I compare publish and update dates for a single post?
- Add content after get_header
- Can’t change theme name
- How to set default values for edit_post_link() in my theme?
- How to make excerpt image be full size instead of thumbnail?
- enqueue script if page is not equal to
- apply_filters to featured image
- Mamp pro permalink issues. Pages keep reverting to index.php
- loading custom.js file after jquery is loaded
- Creating custom function in wordpress to return data from database
- Getting URL of Resized Image
- Adding a new layout for genesis
- themeforce (happytables framework) implementation
- Gutenberg theme development: how to add “headers” option under styles > colors > elements?
- Why WordPress AJAX returns undefined however it works fine when I add static url instead of dynamic function?
- Localize script not working in ajax
- How to enqueue a script which is type module without using script_loader_tag filter?
- How to safely return the HTML?
- Which cache is kicking
- How to find and remove unnecessary theme scripts? [closed]
- Doing context-aware previews in the WordPress Customizer
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- How to use ajax in wordpress and sending the data without refreshing ?
- Adding an external link to product grid list pages for woocommerce
- Issue on Accessing To Ajax Enqeued File to Pass to URL for Ajax Call
- How to insert class in each list of categories?
- pass wordpress template directory into ajax url call
- How do I conditionally defer scripts based on the page name?
- Modify available templates (in dropdown)
- How to place POST TITLE any location inside the posts page
- Theme Action to hook for one time only function [duplicate]
- theme-independent CSS/JS files
- I can’t add CSS with functions.php
- Do I need to escape get_the_post_thumbnail function?
- Alignment Problem [closed]
- What is the need for the static front page [closed]
- Do translation functions like __e() have to take strings in English in themes?
- Difference between “comment_form_default_fields” AND “comment_form_fields”
- Why is switching between themes breaking my child theme?
- using custom page
- not getting API setting saved confirmation message after update on option page
- Problem escaping text which contains html markups
- How the redirect_to parameter is added to wp_login.php when trying to access wp-admin?
- Avada Child Theme Development
- Questions from a new WP Dev [closed]
- How to style bootstrap container in wordpress theme?
- Get Post’s Excerpt Without the Wrapping tags and the Read More link
- Wamp Server error on running wordpress theme on localhost. How do I fix this error? [closed]
- How to enable Disqus comments in a WordPress theme I’m creating from scratch? [closed]
- What $handle does WordPress use for a theme’s implicit style.css?
- searchform.php doesn’t work properly
- CSS added through customizer neglects the need of a child theme?
- Issue when posting updates/changes to wordress
- How to override template files in parent theme?