Modify the behavior of a native widget
-
I needed to append a “More news…” link to the end of the Recent News list in a website sidebar. I found the code involved was not in a custom theme widget, but in a WordPress-native widget, class-wp-widget-recent-posts.php.
I easily altered this widget and make it work the way I needed, but I suppose this was not very hortodox, since the next update would delete my “patch”.
What’s the right way to modify the behavior of this widget?
I found there’s a widget_posts_args filter, but I don’t understand how to use it to append a final link to my list.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Modify the behavior of a native widget’ is closed to new replies.