Showing one recent post


show more Showing one recent post provides you with in-depth training on Developer. Taught by Chris Coyier as part of the WordPress 3: Creating and Editing Custom Themes show less
please wait ...

Showing one recent post

One of the things we want to do in our sidebar is display our most recent blog post. So that's what you see right here. It's looking just how we want it. Only this is just static stuff. this is just a copy and paste of HTML from our HTML and CSS template. We want to do this dynamically. Get it to pull from the database the most recent blog post. So, I have opened our project in TextMate. We're working with the sidebar.php file, and here is the code right here that's dealing with this area.

It says Latest Post and it just has a static date in here, a static title, and some Lorem Ipsum text. We want to replace that with dynamic WordPress stuff to make this pull. So, in order to pull that kind of content from the WordPress database, we're going to using special function called query_posts. It's a really powerful cool function that allows us to adjust what WordPress gives back to us.

We're going to pass it some parameters, which make those adjustments. This is really ea...

Showing one recent post
Video duration: 4m 1s 4h 28m Intermediate

Viewers:

Showing one recent post provides you with in-depth training on Developer. Taught by Chris Coyier as part of the WordPress 3: Creating and Editing Custom Themes

Subjects:
Developer Web
Software:
WordPress
Author:
please wait ...