Shared publicly  - 
 
A while back I'd had a post showing how to modify a query from functions.php. I needed to sort 1 page in my theme, and I was using a child theme. I didn't want to make any special templates, the child theme was just for styling, so it only had functions.php and style.css. filtering on pre_get_posts is handy for that, but WP brought in is_main_query on 3.3 to help pinpoint the pre_get_posts filter. It keeps your query modifications limited to the content, so you don't blow up any widgets or menus.
http://vudu.me/376
Back in August, I ran a little article about running queries from functions.php. We did a little pre_get_posts work, and a bit of a conditional stuff. Well, I learned a bit more since then, and you ne...
1
Add a comment...