WordPress > Optimizing a query to show recent posts with a "View All" link when postcount exceeds ma
- by Scott B
I have a setting in my theme that allows the site owner to set the maximum number of posts ($maxPosts) to display in a "Recent Posts" menu. I'm using a custom script to generate the recent posts (because the Recent Posts widget does not highlight the current page, which I need for my css).
My menu also is set up to display a "View All" link below…