Jimmy Smutek | WordCamp Lancaster, 2016
I'm Jimmy Smutek!!
I'm a web developer from Baltimore, Maryland.
I like 80's music, techno, drum machines, skateboards, PHP, WordPress, and the open web.
I work at a marketing and advertising agency called Ainsley & Co.
At Ainsley we work with small to mid size companies.
We do all sorts of cool stuff, video, copy, design, web, etc.
We use WordPress for the majority of our web projects, and we build custom themes to match our clients needs.
Ewww
Fortunately PHP Storm is ridiculously configurable.
Everything I am going to show can be done with other tools.
## ssh into vagrant box
vagrant ssh
## activate xDebug
xdebug_on
## exit
exit
Debugging is a great way to track down problems and learn how WordPress works.
new WP_Query();
Super easy to setup.
$variable$
$args = [
'post_type' => '$type$',
'posts_per_page' => $num$
];
$query = new WP_Query($args);
if($query->have_posts()) :
while($query->have_posts()) : $query->the_post();
// loop stuff
endwhile; wp_reset_postdata(); // end while have posts
endif; // end if have posts
That's just the tip of the iceberg.
Thanks so much for having me.
Twitter: @smutek
Slides & Resources: