Creating Wordpress Custom Category Templates & WP_Query
Have you ever wanted to create a custom template for an individual category?
Ever wondered how you can change what gets displayed on your homepage? If you've wanted to customize your blog by category, author, or other meta data, this video shows you how to edit the loop, with WordPress's very powerful WP_Query. You can get just about any kind of posts you want or exclude certain kinds of posts as well.
As mentioned in the video, here is the code you need to manually create new pages in your WordPress theme WITHOUT the need for
FTP at all. This is a great little trick I learned. Here's the code you'll need to put in the header
.php file:
in php code:
touch('wp-content/themes/YOURTHEMENAME/category-SLUG.php');
Don't forget to replace YOURTHEMENAME and SLUG with the values you have, as expl
...