Date format in widget
-
I want to get rid of the comma in the date format in a widget with latest posts. I added an adapted document themes/hueman/functions/widgets/alx-posts.php. in the child theme with exactly the same path, but this alone is not enough.
In the previous Hueman version, I made adaptations using these threads:
https://wordpress.org/support/topic/modifying-date-format-1?replies=18
and
https://wordpress.org/support/topic/alx-postsphp-date-format?replies=2Is this what I should do now too, of does the new version of Hueman work in a different way?
(for the date in the post itself and the list in the menu, I found single-author-date.php and post-list-author-date.php and, but the changes I made in these 2 documents do not affect the date format in the widget).
-
Hi MarionFW. The function used to load the widgets has changed. After changing the date format in the widget file you’d need to copy this function to your child theme functions.php file and load the alx-posts.php file from your child theme:
function hu_load() { // Load theme languages load_theme_textdomain( 'hueman', get_stylesheet_directory().'/languages' ); // Load theme options and meta boxes // load_template( get_template_directory() . '/functions/theme-options.php' ); load_template( get_template_directory() . '/functions/init-meta-boxes.php' ); // Load custom widgets load_template( get_template_directory() . '/functions/widgets/alx-tabs.php' ); load_template( get_template_directory() . '/functions/widgets/alx-video.php' ); load_template( get_stylesheet_directory() . '/functions/widgets/alx-posts.php' ); // Load dynamic styles load_template( get_template_directory() . '/functions/dynamic-styles.php' ); }
HI bdbrown, thanks, this worked.
Another question on this subject: is it correct that the php-files in /functions/widgets are not visible in the editor, and that I always have to use ftp to get adjusted files on the right place in the child theme?
Not visible in the default editor: true. You might take a look at this plugin which shows the complete theme folder/file tree:
https://wordpress.org/plugins/wp-editor/Thanks for your help, I might try wp-editor later on. For now, ftp is okay.
- The topic ‘Date format in widget’ is closed to new replies.