Free Checking for Bloggers - Sign up in 5 Minutes! Verificar livre para Blogueiros - Inscreva-se em 5 Minutos!
Powered by MaxBlogPress Powered by MaxBlogPress

Wordpress Hack # 14: 12 Ways to Your Hack Home Page | JTPRATT's Blogar Mistakes
JTPratt's blogar erros





Home Início » Wordpress Hack #14: 12 Ways to Hack Your Home Page »Wordpress Hack # 14: 12 Ways to Your Hack Home Page



Posted in: Publicado em:

blog-setup categoria imagemwordpress categoria imagem
2,229 views 2229 visualizações


Please note: This page was originally written in English. Atenção: Esta página foi originalmente escrito em Inglês.

The original post can be viewed O post original pode ser visualizada here aqui .

Please note: This page was originally written in English.

The text has been translated using an online service such as Google or Babelfish.

The original post can be viewed here.


To have a unique Wordpress blog home page you don’t have to create your own theme. Para ter um único blog Wordpress home page que você não tem que criar seu próprio tema. I’ll show you 12 ways to hack your homepage without getting a new theme that will make your blog stand out from the pack! Eu vou mostrar para você 12 formas para a sua página inicial hack sem obter um novo tema que irá fazer o seu blog destacam-se o pack!

This is installment #14 of Esta cota é de # 14 30 Wordpress Hacks in 30 Days 30 Wordpress Hacks em 30 Dias , be sure to sign up to our RSS feed or email updates at top right of this page!W , Não se esqueça de se inscrever para o nosso feed RSS ou atualizações por e-mail no canto superior direito desta página! W

Everyone wants their blog to be different. Todos querem seu blog para ser diferente. You want it to be unique, to stand out, while remain easy to present what it is your blog is about. Você quer que ele seja exclusivo, a destacar-se, enquanto permanecer fácil de apresentar aquilo que é o seu blog está em causa. The same old “rolling list of posts” and obigatory sidebar can get (real) old after awhile. O mesmo velho "material lista dos postos de trabalho" e pode começar obigatory barra lateral (reais) depois de um tempo antigo. Out of the box, everybody’s Wordpress blog looks the same, and getting a custom theme is the first stab at breaking out of that box. Fora da caixa, todos do Wordpress blog parece o mesmo, e obtendo um tema personalizado é a primeira estocada em sair dessa caixa. The next step (before creating your own theme from scratch) is hacking that theme up a bit to get more of what you want out of it. O próximo passo (antes de criar seu próprio tema a partir do zero) que o tema é "hacking" para cima um pouco para conseguir mais do que você quer sair dela. While some of the techniques I’m about to show you can be used on nearly any page in your Wordpress blog, the focus of this article is “ ways you can hack your Wordpress home page! Embora algumas das técnicas que estou prestes a mostrar que pode ser usado em praticamente qualquer página em seu blog Wordpress, o foco deste artigo é "maneiras de hack Wordpress sua home page!"

*All the plugins mentioned on this page are * Todos os plugins mencionados nesta página são listed on the Wordpress 2.5 Compatibility list* cotada no Wordpress 2.5 Compatibility list *

1. 1. Organize posts in 2 Side by Side Columns : Maybe you are tired of that one-column of content on your homepage, and you want more of a magazine or newspaper layout approach. Organize lugares em 2 Lado a Lado Colunas: Talvez você esteja cansado do que de uma coluna de conteúdo em sua página principal, e você quiser mais de uma abordagem esquema revista ou jornal. If so, breaking up your posts into 2 side by side columns of content could be good for you. Se assim for, desmantelar as suas postagens em 2 de lado a lado colunas de conteúdo poderá ser bom para você. I can’t take credit for this hack, it’s well explained, including where to put the code and which files to edit - over on the Não posso tomar crédito para esse truque, ele é bem explicado, inclusive quando a colocar o código para editar arquivos, e que - mais sobre o Crea8 Design Blog: Side by Side Wordpress Columns Crea8 Design Blog: Lado a lado Wordpress Colunas .

2. 2. Create Custom Comment Counts : Here’sa hack that I desperately tried to figure out for months and months, and never really found the answer to all in one place. Crie Comment Custom Condes: Aqui o hack que eu tentava desesperadamente descobrir por meses e meses, e nunca se encontrou a resposta para todos em um só lugar. I ended up finding the answer not in a blog post, but in theme code instead. Acabei por não encontrar a resposta em uma postagem no blog, mas no tema código vez. Some of the best bloggers sites that I read have some post meta-information in the title header, including a comment count. Alguns dos melhores sites blogueiros que eu tenho lido alguns post meta-informação no cabeçalho o título, incluindo um comentário contar. Usually it’s also a link, and sometimes it has a cool little comment bubble or a phrase like “What do you have to say?” Geralmente ele é também um link, e, por vezes, tem um pouco fria comentário bolha ou uma frase como "O que você tem a dizer?"

Normally to just get a “comment count”, you see code like this in a theme: Normalmente, é só pegar a um "comentário count", você vê como este código em um tema:

 <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> 

After “comments_popup_link” the text inside the three sets of quotes represents what should be printed out if there are no comments yet, only one comment, or more than one comment. Depois de "comments_popup_link" o texto entre aspas três conjuntos de constitui aquilo que deve ser impresso para fora se não existem comentários ainda, apenas um comentário, ou mais de um comentário. You modify the text to say whatever you want here. De modificar o texto para dizer o que quiser aqui. You could change ‘No Comments’ to ‘Be the first to comment…’, etc. But, if you’re like me you probably want to spice it up a bit and add a nice little comment icon. Você pode mudar 'No Comments »para« Seja o primeiro a comentar ... ", etc Mas, se você é como eu, você provavelmente queira combiná-lo um pouco e acrescentar um pequeno comentário ícone. If so, use this code: Se assim for, use este código:

 <?php $comments_img_link= '<img src="/wp-content/themes/mytheme/images/comments-icon.gif"  title="comments" alt="comments" />'; comments_popup_link($comments_img_link .' Comments(0)', $comments_img_link .' Comments(1)', $comments_img_link . '  Comments(%)');?> 

In the first line just change the path your theme image directory and copy and past the code wherever you want the comment count and icon to appear for your home page posts. Na primeira linha basta alterar o caminho directório da imagem de seu tema e copiar e colar o código no local em que você deseja contar e comentar o ícone para aparecer para a sua home page lugares.

Unique Ads Between Posts : This technique can be used to place most anything in between the posts in “the loop” on your home page, I used it to display adsense ads after the 2nd and 6th posts (in the loop of 10). Únicos anúncios entre postagens: Esta técnica pode ser usada para mais nada no lugar entre os lugares no "loop" na sua home page, eu usei-o para exibir anúncios do AdSense após o 2 º e 6 º lugares (no loop de 10). It doesn’t have to be an ad - it could be used to show image dividers between each post, random quotes, special links - anything. Não tem que ser um anúncio - que poderia ser utilizada para mostrar imagens divisores entre cada post, cita aleatório, laços especiais - qualquer coisa.

First - I’ll show (again) what “the loop” basically looks like: Primeiro - Eu vou mostrar (novamente) o que "o ciclo" basicamente aparência:

 <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <p class="postmetadata"><?php the_time('F jS, Y') ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit','',' |'); ?>  <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p> </div> <?php endwhile; ?> 

“The Loop” in Wordpress is a function that retrieves from your database a series of (10) posts. "The Loop" no Wordpress é uma função que recupera o seu banco de dados a partir de uma série de (10) lugares. It starts out with the “have_posts” line and ends with the “endwhile” line. Começa-se com o "have_posts" linha e termina com o "endwhile" linha. It’s called the loop because it does the same thing over and over - one post at a time. É chamado o ciclo, porque ela faz a mesma coisa uma e outra - um post em um momento. That’s why inside “the loop” is the code to print the time, category, comment count, and whatever miscellaneous things are in your themes loop. É por isso que dentro de "o loop" é o código para imprimir o tempo, a categoria, a contar comentário, e seja qual for diversas coisas que estão no seu ciclo temas. You loop might be slightly different than my example for just that reason, different details are displayed for posts in different themes. Você malha poderiam ser ligeiramente diferentes do que o meu exemplo apenas para essa razão, as diferentes informações são exibidas para os cargos em diferentes temas. That’s the beauty of being able to “hack wordpress” - you can easily change those details. Essa é a beleza de sermos capazes de "hack wordpress" - você pode facilmente mudar os detalhes.

What we’re going to do is insert a “counter” in the loop, and then tell it to do something when it reaches certain numbers in the count. O que vamos fazer é inserir um "balcão", no ciclo, e, em seguida, dizer-lhe para fazer alguma coisa quando chegar a determinados números da contagem. Here’s the modified code to do that: Veja abaixo o código modificado para fazer isso:

 <?php if (have_posts()) : ?> <?php $count = 1 ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <p class="postmetadata"><?php the_time('F jS, Y') ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit','',' |'); ?>  <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p> </div> <?php if ($count==2) { include('advert1.php'); } ?> <?php if ($count==6) { include('advert2.php'); } ?> <?php $count = $count + 1; ?> <?php endwhile; ?> 

You’ll notice in this modified example that on the second line we have inserted a counter that starts with “1″ the first time through. Você pode observar neste exemplo que modificou na segunda linha, temos inserido um contador que começa com "1" a primeira vez. The second to the last line (count + 1) ads one number to the counter each time through so it can keep track of which post we’re on. A segunda até a última linha (count + 1) para os anúncios um número cada vez através do contador para que ele possa acompanhar de que estamos no posto. The two lines before that say “if the counter is on #2 or #6 - include this file”. As duas linhas que antes de dizer "se o contador está em # 2 e # 6 - incluir este arquivo". I created 2 files, both advert1.php and advert2.php and placed them in my theme directory. Criei 2 arquivos, tanto advert1.php e advert2.php e colocou-as no meu tema diretório. When the counter reaches 2 or 6 it opens those files and prints the contents to the page. Quando o contador chegar a 2 ou 6 ele abre os arquivos e imprime o conteúdo da página. For my home page, both those files contain the adsense code to be displayed in those spots. Para a minha home page, tanto aqueles arquivos contêm o código do AdSense para ser exibido nesses locais. As I said - you could include anything, and you can name those file whatever you want. Como eu já disse - você pode incluir qualquer coisa, e você pode nomear esses arquivos como quiser. In addition, you can change, modify, or add lines to the counter for any number 1-10 as well. Além disso, você pode alterar, modificar ou acrescentar linhas para o contador para qualquer número 1.10 também.

3. 3. Dump the Next and Previous : I’ve always hated those “previous posts” link on the bottom of every Wordpress homepage. Dump do Próximo e Anterior: Eu odiava aqueles "posts anteriores" link na parte inferior de cada página inicial Wordpress. I want my visitor’s (especially the first time ones) to know that I have many pages of content they can peruse, and a numbered list (like navigation at google) tells them just that. Eu quero o meu do visitante (em especial, pela primeira vez queridos) para saber que eu tenho muitas páginas de conteúdo podem folhear, e uma lista numerada (como a navegação no google) diz apenas que eles. They can easily jump back to page 3, or 6, or whatever to view previous posts, and then back again. Eles podem facilmente saltar para trás, na página 3 ou 6, ou seja o que for para ler postagens anteriores e, em seguida, voltar novamente. Wordpress’ pagination feature of only one page at a time is terrible at best. Wordpress' pagination característica de apenas uma página de cada vez, na melhor das hipóteses é terrível. The O WP Page Numbers Wordpress plugin WP números de página Wordpress plugin takes care of this seamlessly. cuida do presente sem dificuldades. *Note, this plugin can also be used all other templated pages where more than one page of posts are retrieved. * Observe, este plugin pode ser usado também todas as outras páginas templated onde mais de uma página de postagens são obtidas.

4. 4. Homepage Excerpts : If you want to control how many posts on your home page are displayed full and how many to show as excerpts (without mucking in any code at all), Trechos Homepage: Se você deseja controlar quantos postos à sua página inicial são exibidos plena e quantas para mostrar como excertos (sem mucking em qualquer código de todo), Homepage Excerpts Página Inicial Trechos is the plugin you need. é o plugin que você precisa. I use this on most of my Wordpress sites, and you basically configure it with 1 click (how many posts to display full). Eu uso esta na maioria das minhas Wordpress sites, e você basicamente configurá-lo com 1 clique (quantos postos de exibir íntegra).

5. 5. Enable Post Voting : You could enable a voting function by using Habilitar Post Votação: Você pode permitir que uma função através de voto Vote It Up Votação It Up enabling your Wordpress readers to vote for your posts Digg or Reddit style, and then put a list of most popular ones at the top of your homepage like this: permitindo que seus leitores a votarem a favor de Wordpress seus posts Digg Reddit ou estilo e, em seguida, colocar uma lista dos mais conhecidos no topo de sua página inicial como este:

voto-lo wordpress exemplo

6. 6. Random Featured Post : Use your old posts and give them new life, by creating featuring a random post before your content on your home page using the As melhores aleatório Postagem: Use seus posts anteriores e dar-lhes nova vida, através da criação de uma featuring aleatório antes de postar seu conteúdo em sua home page usando a Random Featured Post Wordpress Plugin . As melhores aleatória pós Wordpress plugin. You might also try Você também pode tentar Advanced Random Post Advanced Random Post . .

7. 7. Display an Accouncement : Using the Mostrar um Accouncement: Usando o Genki Announcement Anúncio Genki plugin you can display an announcement before your posts on the homepage. plugin você pode exibir um aviso antes de suas postagens na página inicial. This is great, because you don’t have to hack any code to do this, you can turn the message on or off whenever you want, and you can even restrict it to differerent roles or users if you need to. Isso é ótimo, porque você não tem nenhum código para hack para fazer isso, você pode transformar a mensagem ligada ou desligada quando quiser, e você ainda pode limitá-lo a differerent papéis ou os usuários se precisar. There’s even a timer feature to turn the announcement on or off. Há até uma característica temporizador para activar o anúncio ligado ou desligado. Your message could be holiday related (Merry Christmas!), or a time advertisement (for 48 hour only), a message (to all site admins), or everyone (thanks for visiting my blog!). Sua mensagem poderia estar relacionada férias (Feliz Natal!), Ou uma vez anúncio (por apenas 48 horas), uma mensagem (para todos os administradores local), ou todos (obrigado por visitar o meu blog!).

8. 8. Make a Post “Sticky” : Instead of an announcement or a random post, maybe what you want to do is make one particular post “sticky” - or have it stay at the top of the homepage (until you change it). Faça um Post "Sticky": Em vez de um anúncio ou um aleatória post, talvez o que você quer fazer é ficar em um determinado posto "pegajosa" - ou têm que permanecer no topo da página inicial (até você alterá-la). Easy enough, Lester Chan’s Suficientemente simples, Lester Chan's Creating a Dynamic Sticky Criar uma dinâmica Sticky “. ". Basically he figured out how to create “two loops” on the homepage. Basicamente ele descobriu a forma de criar "dois loops" na página inicial. The first loop gets one post from one category. O primeiro ciclo começa um post de uma categoria. Basically he created a new category called “frontpage” and assigned all the articles he wanted to “feature” for a time. Basicamente ele criou uma nova categoria denominada "FrontPage" e atribuiu todos os artigos que ele queria "recurso" de uma vez. Then the first loop shows one featured article at a time in a styled div box. Em seguida, o primeiro ciclo revela um artigo em destaque uma vez em um estilo div casa. Then, immediately following the normal loop gets the 10 latest posts from the database, but it does check to ensure that it doesn’t duplicate the featured post again. Então, imediatamente após o ciclo normal recebe as últimas 10 lugares do banco de dados, mas ele faz check para garantir que ele não duplica o destaque posto novamente. Very nice hack! Prostituir-se Very nice!

10. 10. Edit Article Excerpts : Editar artigo excertos: Wordpress Excerpt Editor Wordpress trechos Editor is a unique plugin that allows you to add custom excerpts for page (something you can’t do without a plugin). é um plugin único que permite que você adicione excertos de página personalizada (algo que você não pode passar sem um plugin). Normally, if you choose to use excerpts - Wordpress will take the first so many words of your posts. Normalmente, se você optar por utilizar trechos - Wordpress terá as primeiras palavras de tantos de seus posts. As far as your homepage is concerned, this doesn’t do much for “original content” or avoiding “duplicate content” at all. No que diz respeito à sua página inicial está em causa, tal não fazer muito para "conteúdo original" ou evitando "conteúdo duplicado" em tudo. This plugin enables you write a custom excerpt for each post or page, as you write it. Este plugin permite que você escreva um trecho personalizado para cada página ou postagem, como você escrevê-la. Then, if you use excerpts on your homepage - the custom excerpt will be dispayed instead of the first “x” words making your home page contain completely unique content. Então, se você usar trechos de sua página inicial - o trecho será dispayed personalizado em vez do primeiro "x" palavras tornando a sua home page totalmente conter conteúdo exclusivo. It also allows you to write some different linkbait enticing people to click and view that article. Ele também permite escrever algumas pessoas diferentes linkbait sedutora e clique para ler esse artigo. It has options to do the same for both archive and tag pages. Tem opções para fazer o mesmo para ambos os arquivos e páginas tag.

Excerpt Editor also has some advanced options for showing excerpts of “x” recent posts under each Post/Page and it can even show excerpts from “x sub pages” on each page. Trechos Editor também tem algumas opções avançadas para mostrando trechos de "x" últimos lugares em cada Post / Page e ele pode até mesmo exibir trechos do "sub páginas x" em cada página. With all these options, it can do many things beyond custom excerpts on your home page. Com todas essas opções, pode fazer muitas coisas além do costume trechos do livro na sua home page.

11. 11. Add Thumbnails to Your Posts Using Custom Fields : There are many, many ways to add images to posts either manually or with a plugin. Adicionar miniaturas para as suas postagens com campos personalizados: Há muitas, muitas formas de adicionar imagens aos postos manualmente ou com um plugin. Once of the most overlooked features of Wordpress is the “custom field”. Depois dos mais negligenciados funcionalidades do Wordpress é o "campo personalizado". You have the ability to create and fill-in custom fields with every post you write, but probably don’t know it. Você tem a capacidade de criar e enche-nos campos personalizados em cada postagem que você escreve, mas provavelmente não sei. Under every “write post” page is the “custom fields” form (this one from WP 2.5): Sob cada "post escrever" é a página "campos personalizados" formulário (este a partir de um WP 2,5):

campo personalizado exemplo

A custom field is nothing more than metadata that you create. Um campo personalizado é nada mais do que criar metadados. You probably know metadata as keywords and descriptions for search engines, but you can make your own custom metadata fields to describe or enhance your posts. Você provavelmente conhece metadados como palavras-chave e as descrições para os motores de busca, mas você pode criar seus próprios campos personalizados metadados para descrever ou aperfeiçoar seus posts. Each custom field has a “key” and then a “value”. Cada um tem uma personalizados campo "chave" e, em seguida, um "valor". The key is the name of the metadata (like Image or thumbnail) and the value is the content (like file.gif or picture.jpg). A chave é o nome da metadados (como imagens ou miniaturas) eo valor é o conteúdo (como file.gif ou picture.jpg). Just Tadlock has a pretty good Só tem um muito bom Tadlock Introduction to Custom Fields Introdução aos campos personalizados , and also , E também Custom Fields: Adding Images to Posts Personalizar campos: Adicionando imagens de lugares .

12. 12. Create a Date Button for Posts : Seems like most of the more “premium” Wordpress themes (and hand-crafted ones) have a “date button” for the post, a nice image with the month abbreviation and the date (sometimes the day of the week too). Crie um Button Data de posts: Parece que a maior parte dos mais "premium" Wordpress temas (e de mão-crafted queridos) têm uma "data botão" para o cargo, uma bela imagem com o mês da data e abreviação (por vezes, o dia de a semana também). Small Potato at WP-Designer wrote a great tutorial last year on Small Potato no WP-Designer escreveu um ótimo tutorial sobre o ano passado How to Create a Date Button Como Criar um Data Button .

I hope these home page hacks helped you, and as always if you have something to add to make this post better (or a question) - please comment now! Espero que essas home page hacks que você ajudou, e como é hábito, se você tem algo a acrescentar ao fazer este post melhor (ou uma pergunta) - por favor, comente agora!


Tags: , ,

5 Responses to “Wordpress Hack #14: 12 Ways to Hack Your Home Page” 5 Responses to "Wordpress Hack # 14: 12 Ways to Your Hack Home Page"

  1. Paul Paul Has the following to say... Tem o seguinte a dizer ...

    I finally understand what the “loop” is. Eu finalmente compreender o que o "loop" é.

    I was looking for an easy way to put an introduction-explanation-welcome on one of my sites and the sticky plugin looks like it will work well Eu estava procurando uma maneira fácil de colocar uma introdução-justificativa-bem-vindos em um dos meus sites e pegajosa o plugin parece que vai funcionar bem

    Pauls last blog post..1 Pauls última postagem no blog .. 1

  2. Erika Erika Has the following to say... Tem o seguinte a dizer ...

    Your “creating a dynamic sticky” link is swallowing some of your code. Seu "criando uma dinâmica que cola" alguns de engolindo link é o seu código. You might be missing a tag in there. Você pode estar faltando uma tag de lá.

    Great post, though. Great post, apesar de tudo. :)

    Erikas last blog post..1 Erikas última postagem no blog .. 1

  3. AndrewGribben.com » Blog Archive » links for 2008-05-21 AndrewGribben.com »Blog Archive» ligações para 2008-05-21 Has the following to say... Tem o seguinte a dizer ...

    [...] Wordpress Hack #14: 12 Ways to Hack Your Home Page | JTPRATT’s Blogging Mistakes [...] [...] Wordpress Hack # 14: 12 Ways to Your Hack Home Page | JTPRATT's Blogar Mistakes [...]

  4. MyZeroWaste MyZeroWaste Has the following to say... Tem o seguinte a dizer ...

    Thanks very much for these hacks. Muito obrigado por estes hacks. Just what I wanted to enhnace my blog without resorting to plugins. Era o que eu queria enhnace meu blog sem recorrer a plugins.

    MyZeroWastes last blog post.. MyZeroWastes última postagem no blog .. Sunday roundup Domingo Roundup

  5. Akiyamasan Akiyamasan Has the following to say... Tem o seguinte a dizer ...

    Great post! Great post! I’m going to implement the WP page numbers. Estou indo para implementar o WP números de página. thanks! obrigado!

    Akiyamasans last blog post.. Akiyamasans última postagem no blog .. make a difference to a Soldier in 60 seconds fazer a diferença para um soldado em 60 segundos

Question or Comment?? Pergunta ou comentário?? Spill it Now... Agora ele derrame ...

Pulando de alegria ao longo comentários!

We Reward Comments! Nós recompensa comentários!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! Nós dofollow links, e pegar sua última postagem no blog como uma assinatura em cada nova observação do "CommentLuv" plugin! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! Commenters início de cada mês, são listadas em cada página deste site em um regressar às ligados sidebar widget seu URL! We would like to reward you for becoming part of our community! Gostaríamos de recompensar-te por fazer parte da nossa comunidade! Your comment is valuable not only to us, but also all the other readers of this blog! Seu comentário é válido não só para nós, mas também todos os outros leitores deste blog!


Click to add smilies to your post! Clique para adicionar ao seu post smilies! == []^ = (= ((= (|=) r= | 8= 0=) ~= 00= (=;;=)]=;;;