You are previewing WordPress 2.7 Cookbook.
O'Reilly logo
WordPress 2.7 Cookbook

Book Description

100 simple but incredibly useful recipes to take control of your WordPress blog layout, themes, widgets, plug-ins, security, and SEO

  • Take your WordPress blog to the next level with solutions to common WordPress problems that make your blog better, smarter, faster, and more secure

  • Enhance your SEO and make more money online by applying simple hacks

  • Fully tested and compatible with WordPress 2.7

  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible

In Detail

About 120,000 blogs are created every day. Most of them quickly die, but a few stay, grow up, and then become well known and respected places on the Web. If you are seriously interested in being in the top league, you will need to learn all the tricks of the trade. WordPress 2.7 Cookbook focuses on providing solutions to common WordPress problems, to make sure that your blog will be one of the ones that stay.

The author's experience with WordPress enables him to share insights on using WordPress effectively, in a clear and friendly way, giving practical hands-on solutions to WordPress problems, questions, and common tasks – from themes to widgets and from SEO to security.

Are you feeling limited with WordPress, or are you wondering how popular blogs do a certain kind of thing that you can't? With this cookbook, you will learn many WordPress secrets and techniques, with step-by-step, useful recipes dedicated to achieving a particular goal or solve a particular problem. You'll learn the secret of expensive premium themes, how to optimize your blog for SEO and online profits, and how to supercharge WordPress with killer functions used by the most popular blogs over the Internet.

Table of Contents

  1. WordPress 2.7 Cookbook
    1. WordPress 2.7 Cookbook
    2. Credits
    3. About the Author
    4. About the Reviewers
    5. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code for the book
        2. Errata
        3. Piracy
        4. Questions
    6. 1. Getting Ready to Cook with WordPress
      1. Managing media files with the Media Library
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Live editing themes with the built-in Theme Editor
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Editing plugins with the WordPress built-in Plugin Editor
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Managing authors and users with the User Manager
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Importing and exporting content with the Import and Export tool
        1. Getting ready
        2. How to do it...
        3. How it works...
    7. 2. Finding and Installing Themes
      1. Installing a theme
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. Classic themes
            1. Agregado theme
            2. Leopress theme
            3. Rio theme
            4. WP Imagination theme
            5. WP CODA theme
            6. Outdoorsy
          2. Advanced themes
            1. Mimbo 2
            2. OpenBook
            3. Brightness
            4. Rebel Magazine
            5. Revolution 2
            6. Arthemia
          3. Premium themes
            1. Mimbo Pro
            2. WP Vybe
            3. Open Air
            4. Citrus theme
            5. Fresh News
          4. Lists of themes
            1. WordPress.org theme gallery
            2. 100 excellent WordPress themes
            3. Premium WordPress themes gallery
            4. Free magazine style WordPress theme gallery
            5. Best WP theme
            6. WPVote WordPress themes
            7. ThemeLab free themes
          5. Important notes about themes
            1. Important factors to consider
            2. Magazine versus blog themes
              1. Questions you must ask yourself before choosing a magazine theme
    8. 3. Get the most out ofyour WordPress Theme
      1. Modifying your theme colors
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      2. Modifying your theme fonts
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. Tips and things to know about fonts
      3. Creating and integrating a favicon
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Integrating your own logo
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Adding a link to the homepage
      5. Adding social bookmarking buttons to your theme
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using CSS to style the social bookmarking widget
          2. Adding Del.icio.us live count
          3. Code explanation
      6. Integrating Feedburner feeds on your theme
        1. How to do it...
        2. How it works...
      7. Integrating Twitter on your theme using the Twitter Tools plugin
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Displaying your Twitter entries on your blog using a page template
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Customizing WordPress admin login page
        1. How to do it...
        2. How it works...
      10. Using conditional tags to display content on specific pages
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      11. Using page templates in your theme
        1. Getting ready
        2. How to do it...
        3. How it works...
      12. Creating an archive page
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      13. Creating a custom 404 error page
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      14. Using a static page as a homepage
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      15. Creating a Featured Posts block on your homepage
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      16. Making your new posts stands out with a custom style
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    9. 4. Doing anything withPlugins and Widgets
      1. Installing plugins
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Getting rid of comment spams with Akismet
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Backing up your database with WP Database Backup
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Scheduling automatic backups
        1. How to do it...
        2. How it works...
        3. There's more…
      5. Optimizing your blog performances with WP Super Cache
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Prevent URLs from being cached
      6. Adding redirects for changed Permalinks
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using redirects for affiliate marketing and cloaking
      7. Getting more comments with the Subscribe to Comments plugin
        1. How to do it...
        2. How it works...
        3. There's more...
      8. Accessing real time statistics with WordPress.com Stats
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Monetizing your blog with ISIS Ads Management
        1. Getting ready
        2. How to do it...
        3. How it works...
      10. Extending WordPress search with Search Unleashed
        1. Getting ready
        2. How to do it...
        3. How it works...
      11. Installing widgets
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Installing downloaded widgets
      12. Making your sidebar widget-ready
        1. Getting ready
        2. How to do it...
        3. How it works...
      13. Creating two (or more) different widget-ready zones
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      14. Modifying core widgets
        1. Getting ready
        2. How to do it...
        3. How it works...
      15. Creating your own widget
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Complete widget code
    10. 5. Displaying Posts
      1. Getting posts within the WordPress loop
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Retrieving posts from a particular category only
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Getting an exact number of posts
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Retrieving posts by date
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Getting posts published today
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Getting posts published exactly a year ago
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Using two different loops withoutduplicate posts
        1. How to do it...
        2. How it works...
      8. Accessing post data outside of the WordPress loop
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Accessing permalinks outside the loop
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using the $post global variable
      10. Displaying any RSS feed on your blog
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      11. Displaying thumbnails on your blog homepage
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Defining a default image
      12. Alternating background color on post list
        1. Getting ready
        2. How to do it...
        3. How it works...
      13. Displaying posts in two columns
        1. Getting ready
        2. How to do it...
        3. How it works...
      14. Saving time by using WordPress shortcodes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      15. Creating a nice download message box using a shortcode
        1. Getting ready
        2. How to do it...
        3. How it works...
    11. 6. Managing and Enhancing Multi-Author Blogs
      1. Creating an author page template
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      2. Displaying a custom login form in your blog's sidebar
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Adding a control panel to your blog's sidebar
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Adding a login form and a control panel
      4. Configuring author roles
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Controlling what authors can do
            1. User roles and their capabilities
            2. Controlling what users can see in your theme
      5. Displaying author-related information on posts
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      6. Displaying author picture on posts
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      7. Displaying the author's gravatar picture on posts
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Adding moderation buttons to the comments
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Getting notified when a new draft is saved
        1. Getting ready
        2. How to do it...
        3. How it works...
      10. Allowing multiple authors on posts
        1. Getting ready
        2. How to do it...
        3. How it works...
      11. Displaying a list of all of the authors
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Controlling the wp_list_authors() function
    12. 7. Securing yourWordPress Blog
      1. Creating manual backups of your WordPress blog
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      2. Restoring a MySQL backup
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Creating backups of your WordPress files
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Using a shell script to create automatic files and database backups
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Securing your plugins directory
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Removing a WordPress version from the theme files
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Getting rid of the Administrator account
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Forbiding login automatically after some failed login attempt
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Protecting the wp-admin directory brute force with the help of AskApache
        1. Getting ready
        2. How to do it...
        3. How it works...
      10. Restricting wp-admin directory to your IP address
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Allowing access to more than one IP
      11. Testing your blog security
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      12. Denying comment posting on no referrer requests
        1. Getting ready
        2. How to do it...
        3. How it works...
    13. 8. SEO Tips and Tricks to Get More Visits
      1. Optimizing your permalinks for SEO
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Structure tags reference
          2. Further optimizing your permalinks
      2. Migrating your permalinks safely
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Optimizing your title tag for SEO
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Creating Meta descriptions for your posts
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. A more sophisticated code by using custom fields
      5. Avoiding duplicate content with a robot.txt file
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. PHP code to avoid duplicate content
      6. Adding a sitemap to your blog
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Using Google Webmaster Tools
        1. How to do it...
        2. How it works...
        3. There's more...
          1. Overview
          2. Statistics
          3. Links
          4. Sitemaps
          5. Tools
      8. Pinging third party services
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Services to ping
      9. Enhancing your WordPress blog SEO with the All in One SEO Pack plugin
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. Five more tips for a better SEO
            1. Get backlinks
            2. Use the proper h tags structure
            3. Make sure your blog is XHTML valid
            4. Make good use of keywords
            5. Think about your permalinks twice
    14. 9. Making Money with WordPress
      1. Integrating Adsense to your WordPress blog
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Displaying ads anywhere in your posts by using WordPress shortcodes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Inserting shortcodes into sidebar widgets
      3. Displaying Adsense ads to search enginesvisitors only
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Managing who Sees Ads
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Global options
          2. Advanced conditions
      5. Inserting ads in your RSS feeds
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Solving problems with Feedburner
      6. Redirecting your WordPress RSS feeds to Feedburner
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Plugin versus hack
      7. Showing your blog stats to find advertisers
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Managing your 125*125 px ad spots
      8. Enhancing your Advertise page by adding Paypal subscriptions
        1. Getting ready
        2. How to do it...
        3. There's more...
          1. Telling advertisers how to unsubscribe
    15. 10. Enhancing UserExperience
      1. Replacing the Next and Previous links by a paginator
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Highlighting searched text in search results
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Using the CSS sliding doors technique within WordPress
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Creating a drop-down menu for your categories
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Creating a horizontal drop-down menu
            1. Part 1: PHP and HTML
            2. Part 2: The CSS
            3. Part 3: (Optional) JavaScript
      5. Adding a breadcrumb to your theme
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using a hack to display breadcrumbs
      6. Displaying related posts
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Displaying tabs on your sidebar
        1. Getting ready
        2. How to do it...
        3. How it works...
    16. 11. Make your Blog Stand Out
      1. Rewarding your commentators to get more comments
        1. How to do it...
        2. How it works...
      2. Adding a print stylesheet to your blog
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using WordPress as a photoblog
            1. Photoblog
            2. Nishita
            3. Fotolog
      3. Creating your own Photoblog theme
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Creating an iPhone-friendly version of your blog
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using an header image
          2. Modify the title and slogan
      5. Integrating a forum in your WordPress blog
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Skins
          2. Moderators
          3. User groups