WordPress 2.8 Themes Cookbook

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

In order to develop a killer theme for WordPress, developers need to have a solid understanding of all aspects of theme development. There is more to a theme that the technologies you use to develop it or shiny features that you decide to add to it. Here are just a few items theme developers need to pay attention to: * Theme navigation * Templates * Sidebars (single or multiple) * Media integration (galleries, videos, ...) * Theme usability * Comments section * Theme back-end * Site layout * Search Engine Optimization WordPress 2.8 Themes Cookbook takes a divide and conquer approach to theme development. Instead of throwing you in deep waters from the get go, the authors focus on each of the above-mentioned topics to help you become a more well-rounded theme developer. This book may not cover everything there is to know about WordPress, but it gets you on your way towards developing killer themes. WordPress 2.8 Themes Cookbook, as the name suggests, is written for those of you who respond better to a more practical approach. It has over 100 effective tips that you can take advantage of to design your own WordPress theme or take an existing one to the next level. The book reads like one of those "top 100 tips" lists, but it does provide enough details for you to keep up. The code snippets, demonstrations, and tips discussed in this work make the learning process even easier. There is no better way to learn theme development than actually seeing things done in practice. That's what this book offers. I was also impressed with the coverage of advanced topics and layouts in the last two chapters. While more topics could have been covered, the chapters still have enough information to point developers to the right direction. If you are just getting started with WordPress development or want to take your existing work to the next level, this book is for you.

Author(s): Nick Ohrn, Lee Jordan
Edition: 1st New edition
Publisher: Packt Publishing
Year: 2010

Language: English
Pages: 313

Cover......Page 1
Copyright......Page 3
Credits......Page 4
About the Authors......Page 5
About the Reviewers......Page 7
Table of Contents......Page 8
Preface......Page 12
Introduction......Page 16
Finding documentation on WordPress.org......Page 17
Downloading themes from the WordPress theme repository......Page 19
Downloading themes from third-party websites......Page 22
Installing and activating a theme......Page 24
Displaying the blog name......Page 27
Creating a theme from scratch......Page 29
Creating a child theme......Page 32
Creating a theme by using a theme framework......Page 35
Adding expected WordPress hooks......Page 37
Including PHP files from your theme......Page 38
Introduction......Page 40
Listing all of the pages that exist on a blog......Page 41
Listing all of the categories defined for a blog......Page 43
Listing all of the tags in use on a blog......Page 46
Highlighting the current page in the navigation......Page 49
Adding a search function to a theme......Page 50
Getting the category page link from a category name......Page 51
Displaying page links only if the destination page exists......Page 52
Creating a category drop-down menu......Page 53
Creating drop-downs using child pages......Page 55
Introduction......Page 58
Creating a basic Loop......Page 59
Displaying ads after every third post......Page 61
Removing posts in a particular category......Page 63
Removing posts with a particular tag......Page 64
Highlighting sticky posts......Page 65
Creating multiple loops in a single template......Page 67
Displaying only posts in a particular category......Page 69
Styling every other post differently......Page 70
Styling posts in a particular category differently......Page 72
Showing every post in a category on a category archive page......Page 73
Introduction......Page 74
Displaying the post title......Page 75
Automatically limiting the number of words of content......Page 76
Determining if the user is on a specific page......Page 79
Determining if the user is viewing a post in a particular category......Page 80
Displaying the post date for each post......Page 81
Highlighting search terms in post content......Page 82
Displaying login/logout links......Page 84
Adding navigation through older/newer posts......Page 85
Displaying an edit link for posts......Page 86
Displaying custom field content......Page 87
Displaying a post author's avatar......Page 89
Displaying a comment form on a post......Page 92
Displaying comments on a post......Page 95
Displaying the latest comments on your blog......Page 98
Highlighting the post author's comments......Page 99
Alternating the style for comments......Page 101
Displaying threaded comments properly......Page 103
Introduction......Page 106
Using the Text widget for custom sidebar content......Page 107
Including a dynamic sidebar in your theme......Page 109
Including multiple dynamic sidebars in your theme......Page 111
Setting the default widgets for a sidebar in your theme......Page 116
Positioning multiple sidebars in your theme by using CSS......Page 119
Styling the appearance of sidebars in your theme by using CSS......Page 123
pages by using the Widget Logic plugin and conditional tags......Page 125
Showing asides in the sidebar by using the Miniposts plugin......Page 129
Adding an interactive Facebook-style wall to a sidebar by using jQuery......Page 131
Introduction......Page 134
Creating a simple page template......Page 135
Creating an archives page template......Page 138
Creating a taxonomy navigation template......Page 144
Displaying author avatars and descriptions......Page 148
Creating a table of contents page template......Page 153
Showing your pictures from Flickr......Page 159
Displaying a special template for a specific category......Page 163
Introduction......Page 166
Aligning images properly within a post......Page 167
Styling image galleries......Page 170
Styling image captions......Page 173
Creating a media template......Page 176
Creating a media template for a specific media type......Page 178
Displaying a related image for every post......Page 181
Creating video posts by using the Viper's Video QuickTags plug-in......Page 183
Introduction......Page 186
Getting author data via an author's ID......Page 187
Dynamically displaying the author's name and linked e-mail address......Page 188
Listing all of the published authors on a site......Page 190
Listing the authors who most recently published a post......Page 193
Listing authors by the total number of comments that their posts have received......Page 195
Adding a custom user field to display an author's Twitter link......Page 198
Introduction......Page 202
Linking to your theme's JavaScript files directly......Page 203
Adding JavaScript files to your theme programmatically......Page 204
Adding a bundled library to your theme programmatically......Page 209
Creating a featured post slider......Page 212
Making sidebar widgets toggle-able......Page 217
Adding a font size toggle......Page 220
Introduction......Page 224
Adding a theme options page......Page 225
Allowing for multiple theme color schemes......Page 230
Changing the default Gravatar icon for your theme......Page 237
Registering shortcodes for your theme......Page 241
Localizing your theme......Page 244
Displaying information based on the logged-in user's role......Page 248
Packaging your theme for distribution......Page 251
Uploading your theme to the WordPress.org theme repository......Page 253
Adding a skip navigation link for usability......Page 256
Centering your site's layout in the browser window......Page 260
Setting up a randomly-rotating header image......Page 263
Making theme components drag-and-drop......Page 268
Creating a global toolbar for your theme......Page 278
Creating tabbed navigation for your theme......Page 286
Index......Page 296