WordPress - Melhore sua 404 respostas File Not Found (3 de 4)
Em nossos artigos anteriores desta coleção temos mostrado como fornecer seus espectadores com uma ferramenta que lhes permita permanecer no seu site WordPress quando começam um arquivo erro 404 não encontrado através de um formulário de busca e um mapa do site. Neste post vamos realizar um novo passo em frente, vamos dar-lhes uma outra ferramenta, Smart 404 , para lhes dar mais chances ...
|
Aplica-se a:
WordPress 2.8 |
Essas personalizações são fornecidos "COMO ESTÃO" sem qualquer tipo de garantia e segurança DiceLock nega todas as garantias, expressas ou implícitas, incluindo as de comercialização, não violação de terceiros a propriedade intelectual ou da APTIDÃO PARA UMA FINALIDADE PARTICULAR. Actualizar ou reinstalar o código fonte personalizada (pacote, plugin, componente, ...) pode remover as personalizações realizadas. |
Em nossos posts anteriores, temos mostrado como adicionar uma caixa de pesquisa e um link do site Mapa em sua 404 arquivos encontrados página de erro, não permitindo que seus espectadores a pesquisa que eles estão procurando, como em:
Há uma outra ferramenta que melhora o seu site web, este é Smart 404 . Ele permite realizar uma busca de suas mensagens, tags e categorias, utilizando palavras-chave da URL solicitada. Se houver uma correspondência, redirecionar para a página em vez de mostrar o erro. Se houver mais de uma correspondência, o arquivo 404 Not Found página pode usar algumas tags de templates para fornecer uma lista de sugestões para os telespectadores.
Uma forma de permitir que seus 404 Not Found Arquivo telespectadores ir mais longe o seu site é para mostrar uma lista de sugestões para os telespectadores.
Tal como em posts anteriores, você pode colocar no seu 404 Arquivo página não encontrada, talvez em sua 404.php ou index.php (localizado sob atahualpa pasta) no tema Atahualpa, como no exemplo solicita a Smart 404 plugin. O arquivo 404 Not Found página seria tema Atahualpa:
else : ?> <h2> <?php _e ( 'Not Found' , 'atahualpa' ) ; ?> </h2> <table width="100%"> <tr> <td colspan="2"> <br /><p> <?php _e ( "Sorry, but you are looking for something that it's not found. " , "atahualpa" ) ; ?> </p><br /> </td> </tr> <tr> <td colspan="2"> <b>Site Map</b><br /><br /> You can access the <a href="site-map/">Site Map</a> in order to view all blog content, maybe you can access the information you are looking for from there !!!<br /><br /> </td> </tr> <tr> <td colspan="2"> <?php if ( smart404_has_suggestions ( ) ) : ?> <b>Suggestions</b><br /><br /> We have found that maybe there is something related to what you are looking for at the following links, you can try them:<br /><br /> <?php smart404_suggestions ( ) ; ?> <?php endif ; ?> <?php if ( smart404_loop ( ) ) : ?> <p>or, try any of these posts:</p> <?php while ( have_posts ( ) ) : the_post ( ) ; ?> <a href=" <?php the_permalink ( ) ?> " rel="bookmark" title=" <?php the_title_attribute ( ) ; ?> "> <?php the_title ( ) ; ?> </a> <?php endwhile ; ?> <?php endif ; ?> </td> </tr> <tr> <td colspan="2"> <br /><br /><b>Site search</b><br /><br /> Or you can use our search form to find the proper information you are looking for ...<br /><br /> </td> </tr> <tr> <td width="50%"> <?php get_search_form ( ) ; ?> <br /><br /> </td> <td> </td> </tr> </table> <?php endif ; ?> <?php get_footer ( ) ; ?> <? Php / / Fim do: Se houver lugares / / Se não houver lugares: mais:?> <h2> <? Php _e ('Not Found "," atahualpa');?> </ H2> < largura da mesa = "100%"> <tr> <td colspan="2"> <br /> <p>? php _e ("Desculpe, mas você está procurando por algo que não é encontrado." Atahualpa " );?> </ p> <br /> </ td> </ tr> <tr> <td colspan="2"> <b> Mapa do Site </ b> <br /> <br /> Você pode acesso a <a href="site-map/"> Mapa do Site </ a> para visualizar todo o conteúdo do blog, talvez você possa acessar as informações que você está procurando a partir daí! <br /> <br /> </ td </ tr>> <tr> <td colspan="2"> <? php if (smart404_has_suggestions ()):?> <b> Sugestões </ b> <br /> <br /> Encontramos que talvez haja algo relacionado ao que você está procurando nos seguintes links, você pode experimentá-los: <br /> <br /> <? php smart404_suggestions ();?> <? php endif;?> <? php se (smart404_loop ()):?> <p>, ou tentar qualquer um desses lugares: </ p> <? php while (have_posts ()): the_post ();?> <a href = "<? php the_permalink () ? "rel> =" bookmark "title =" <? the_title_attribute php (); ">> <? php the_title ();?> </ a> <? php endwhile;?> <? php endif;?> < / td> </ tr> <tr> <td colspan="2"> <br /> <br /> <b> pesquisa Site / b> <br /> <br /> Ou você pode usar nosso formulário de pesquisa para encontrar a informação apropriada que você está procurando ... <br /> <br /> </ td> </ tr> <tr> <td width="50%"> <? get_search_form php ();?> < br /> <br /> </ td> <td> </ td> </ tr> </ table> <? php endif;?> <? get_footer php ();?>
Quando o código é inserido:
( smart404_has_suggestions ( ) ) : ?> <b>Suggestions</b><br /><br /> We have found that maybe there is something related to what you are looking for at the following links, you can try them:<br /><br /> <?php smart404_suggestions ( ) ; ?> <?php endif ; ?> <?php if ( smart404_loop ( ) ) : ?> <p>or, try any of these posts:</p> <?php while ( have_posts ( ) ) : the_post ( ) ; ?> <a href=" <?php the_permalink ( ) ?> " rel="bookmark" title=" <?php the_title_attribute ( ) ; ?> "> <?php the_title ( ) ; ?> </a> <?php endwhile ; ?> <?php endif ; ?> </td> </tr> <tr> <td colspan="2"> <? php if (smart404_has_suggestions ()):?> <b> Sugestões </ b> <br /> <br /> Nós descobrimos que há algo relacionado com o que você está procurando nos seguintes links, você pode experimentá-los: <br /> <br /> <? php smart404_suggestions ();?> <? php endif;?> <? php se smart404_loop (()):?> <p>, ou tentar qualquer um desses lugares: </ p> <? php while (have_posts ()): the_post ();?> <a href = "<? php the_permalink ()?" rel => "favorito" title = "<? the_title_attribute php ();">> <? php the_title ();?> </ a> <? php endwhile;?> <? php endif;?> </ td> </ tr>
Com esta alteração os espectadores vão conseguir algo parecido com a tela seguinte, quando começam um arquivo de erro 404 não encontrado:
Como já comentado em nossos posts anteriores, desta forma, os espectadores irão chegar na frente dos seus instrumentos de olhos que irá torná-los a permanecer em seu site.



























