Need to Overwrite “class-widget-recent-posts.php” widget with my custom code.
-
I need to overwrite “class-widget-recent-posts.php” because there is no way you can add a category to the recent post widget. I tried to create the same folder structure in the child theme but it’s not working.
<?php if ( woodmart_loop_prop( ‘parts_meta’ ) && get_the_category_list( ‘, ‘ ) ): ?>
<div class=”recent-posts-cat”><?php echo get_the_category_list( ‘, ‘ ); ?></div>
<?php endif ?>
Let me know how I can add the above code after the post title or date.
Attachments:
You must be
logged in to view attached files.
Hello,
Unfortunately, our widget cannot be overridden via a child theme. Basically, customers just make a new one and plug it in.
Thanks for your time and have a great day.
Kind Regards
So are you saying there is no way we can tweak the recent posts widget?
Hello,
Our “Recent Posts” widget cannot be overridden via the child theme. You can use the default widget from WordPress and customize it or use some plugins for showing categories in the default “Recent Posts” widget.
Kind Regards