Using page templates in your theme

Even though most of the WordPress themes use a unique page template, our favorite blogging engine allows us to create as many different page templates as we want. Why always use the same page layout in your blog Using different page templates will make your blog look a lot more professional. In this recipe, you'll learn to create and use page templates. To achieve this recipe, you only need a WordPress theme and a text editor. In the following example, we use the WordPress default theme. If...

Displaying Adsense ads to search engines visitors only

In the first recipe of this chapter, when I described the pros and cons of using Google Adsense, I talked about a thing called Smart Pricing, which basically causes you earn less money. In this recipe, I'm going to tell you what exactly Smart Pricing is and how to avoid being Smart Priced by Google. Some blogs, or web sites, have a low CTR (Click Through Rate). CTR means the average clicks on your ads. For example, your CTR is 1 if your ads are displayed to 100 visitors and only one of them...

Modifying your theme colors

Have you ever come across a WordPress theme available online and thought, 'Wow, this is a great theme but it would look even better if it had a green layout ' This happens to me really often, and I'm pretty sure it's happened to you as well. Luckily, changing the theme color scheme isn't as difficult as it seems to be. Of course, you'll need at least one readily available WordPress theme. You'll also need a text editor. In this example, we shall use the Vi text editor which is my favorite text...

Customizing Word Press admin login page

If you're creating a WordPress web site for a client, you'll probably like to make his or her login page a bit more personal than the default. In this recipe, we'll see how to make a custom admin login page for your clients, or even for yourself. While writing this recipe, I was tempted to provide you two ways to customize your admin login page with the help of a plugin, and by using a hack. But in the hack method, you are required to edit the WordPress core files, this really isn't a good...

Using conditional tags to display content on specific pages

Sometimes, you may want to display some content only on specific pages or sections. For example, you may wish to display a welcome message on your blog homepage or show specific information on the Categories page. In this recipe, Let's learn how to do it with the help of WordPress conditional tags. To achieve this recipe, you'll need a WordPress theme that you can edit. 1. WordPress conditional tags are Boolean variables so you have to use them as a condition on a php if statement as shown in...

Modifying your theme fonts

Now that you have learned how to search and replace hexadecimal color codes, let's customize your theme a bit more. In this recipe, we're going to see how we can easily modify the fonts used in a WordPress theme and also discuss about the good practices for typography on a WordPress blog. For this recipe, you'll need exactly the same things that were needed in the Modifying your theme colors recipe a theme to customize, and a text editor. A common beginner mistake is to try and use non web-safe...

Making your new posts stands out with a custom style

Creating a Featured Posts block, as we have seen earlier, allows you to specify some posts to be displayed on your blog as the featured posts. However, you may prefer to automatically make your latest posts stand out. In this recipe, we shall learn to modify the classic WordPress loop to give another style to your latest posts. If you're just getting started or vour web site doesn't take up too much traffic just yet, then a shared webhost may be all you need. If you're just getting started or...

I

sidebar- margin-top l pxj paddi rig-right 0pxj 404 Template lt 404.php Archives archive.php Archives Page Template archives.php Attachment Template attachment, php Category Template category.php Comments comments.php Footer footer.php Header header.php Links Page Template I inks.php Main Index Template index.php While editing a theme file in WordPress theme editor, you're actually editing the real file on the server. Once you press the Update File button, the file is saved and the previous...

Birmingham Mumbai

No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the...