Tagged: child theme, Latest News, Widget
Hello,
I’d like to change to replace the date of the post in the Latest News widget by “Read More”.
I found where I need to make the modification in class avia_newsbox and function widget
by
But how can I put it in my child theme to make it upgrade friendly ? Can you tell me how I can put it in my functions.php for example ?
Thanks in advance for your help.
Basile
We wrapped all widget classes in a class_exists() function. This function makes sure that the child theme code can overwrite the parent class without triggering a php error. You just need to copy the entire “avia_newsbox” class into a child theme file (eg into functions.php or any other php file which you included with require_once() or include(). Then modify the class in your child theme and the parent theme will load the modified widget code instead of original parent theme code.
Excellent! Thx for your help!