Wordpress Hack #2: How To Create A Master Archive Index Page Wordpress NOVITA # 2: Come creare un master pagina Indice archivi
1,579 views - 1579 opinioni -Posted in: Posted in:
1,579 views 1579 opinioni
Please note: This page was originally written in English. Attenzione: Questa pagina è stata originariamente scritto in inglese.
The original post can be viewed Il post originale può essere considerata here qui .
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.
In your Wordpress blog do you have a sortable clean and easy way for visitors to access your previous posts? Nel tuo blog Wordpress avete uno ordinabili pulito e facile per i visitatori di accedere al tuo post precedenti? Other than the month based archive link in your sidebar, you may not have an archive index at all! Diverso da quello basato mesi archivio link nella tua sidebar, è possibile che non sono indice di un archivio a tutti! It’s time you hacked your own Master Archive Index Page! E 'ora che tu hacked il tuo Master Archivio Index Page!
This is Wordpress Hack #2 in our 30 “Hack-a-Thon”! Si tratta di Wordpress Hack # 2 nei nostri 30 "Hack-a-Thon"! That’s right, I’m going to give you one Che il diritto, ho intenzione di dare uno Wordpress hack per day for 30 days Wordpress hack al giorno per 30 giorni , and at the end of that time you will have pimped out your blog like you never would have believed possible! , E alla fine di quel tempo si dovrà pimped fuori il tuo blog come voi avrebbe mai creduto possibile! Be sure to signup for the RSS feed or subscribe by email at the top of the page. Ricordati di iscrizione per il feed RSS o via e-mail iscriviti alla parte superiore della pagina.
Out of the box the default Archives for Wordpress aren’t very sexy. Fuori la casella di default Archivi per Wordpress non sono molto sexy. In fact, as I’ve mentioned in previous posts the word thing about Wordpress (to me) is the fact that the content seems hard to navigate, hard to get to, and downright self-defeating at times. In realtà, come ho ricordato nel precedente post la parola cosa Wordpress (per me) è il fatto che il contenuto sembra difficile da navigare, difficile da raggiungere, e addirittura auto-volte a sconfiggere. Let’s take this blog as it stands right now as an example. Prendiamo questo blog così com'è ora, come un esempio. The homepage has one full post and 9 excerpted posts. La home page ha una piena post Estratti e 9 posti. The sidebar contains links to the last 10 posts, and most viewed posts, in addition to a link to categories and monthly archives. La barra laterale contiene i collegamenti agli ultimi 10 posti, e la maggior parte dei posti visti, oltre a un link alle categorie e archivi mensili. I can also search, and those are my basic options for finding content. Sono in grado anche di ricerca, e quelle sono le mie opzioni di base per la ricerca di contenuti. The custom pages I’ve setup also lead to some article series and categorized content. Le pagine personalizzate di installazione Ho anche portare ad alcune serie di articoli divisi per categoria e contenuto. I currently don’t have an HTML web page site map (just an XML sitemap for search crawlers), so there really is no way to get a birds eye view of all my content. Attualmente non si dispone di una pagina web HTML mappa del sito (solo uno Sitemap XML per la ricerca crawler), in modo davvero vi è alcun modo per ottenere un occhio uccelli vista di tutti i miei contenuti. I’m rapidly approaching 100 posts, but at any give time you’re lucky to have more than 10-15 options for content as you surf around my blog. Sono rapidamente avvicinando 100 posti, ma in qualsiasi momento dare siete fortunati ad avere più di 10-15 opzioni per i contenuti come navigare intorno a voi il mio blog.
Your theme may or may not currently display any more than month based archive pages, which will just be links in your sidebar to the months of the year you had posts. Il tema può o non può attualmente visualizzare ogni mese più di archivio basato pagine, che solo i link nella tua sidebar per i mesi dell'anno si erano posti. Some themes also have a calendar. Alcuni temi hanno anche un calendario. All these normally do is use your “archive.php” in your theme directory as a template to bring up a list of posts the same way you index, search, category, or tag pages do - a list of up 10 to posts at a time with ‘previous’ and ‘next’ links at the bottom of the page. Tutte queste normalmente fare è utilizzare il "archive.php" nella vostra directory tema come un modello per portare l'elenco dei posti allo stesso modo è indice, ricerca, la categoria, o tag di pagine fare - un elenco di fino a 10 posti a tempo con 'precedente' e 'prossimo' link in fondo alla pagina. In my experience, most themes don’t have a master archive page (or what the In base alla mia esperienza, la maggior parte dei temi non si dispone di un archivio master pagina (o ciò che la Wordpress Codex calls the “Archive Index” Wordpress Codex chiama "Archivio Indice" , although some have a “archives.php” file to create one from. , Anche se alcuni hanno un "archives.php" file da creare uno. Notice that this template file has an “s” on archives.php. Si noti che questo modello ha un file "s" a archives.php. Look in your theme directory, and you should have a file named “archives.php”. Cerca in tema di directory, e si dovrebbe avere un file chiamato "archives.php". If you do add the first 5 lines below at the very top of that file, and the rest of the code in “the loop” of that page (after the header and before the endwhile). Se si aggiungono le prime 5 righe di seguito al primo di questo file, e il resto del codice in "loop" di quella pagina (dopo l'intestazione e la prima endwhile). If for some reason your theme doesn’t have an archives.php, just download a copy of your “page.php” file, rename and save it as “archives.php” and then add these code to it (then upload to your theme directory). Se per qualche motivo, il tema non ha ancora una archives.php, solo scaricare una copia del tuo "page.php" file, rinominare e salvarlo come "archives.php» e poi aggiungere questi codice ad esso (per poi caricare il tuo tema di directory).
<?php /* Template Name: Master Archives Page */ ?> <h2>Archives by Month:</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> <br /> <h2>Archives by Subject:</h2> <ul> <?php wp_list_cats(); ?> </ul>
Make sure you have the “Template Name” in the top. Assicuratevi di avere il "Modello Nome" in alto. Now upload this file to your theme directory, and in your Wordpress dashboard go to “Write -> Page”. Ora caricare il file sul tema directory, e nella tua bacheca Wordpress andare a "Scrivi -> Pagina". On the right hand side you’ll see “page template” as in the image example here. Sul lato destro vedrete "modello di pagina", come l'immagine di esempio qui. Just select “Master Archives Page”. Basta selezionare "Master Archivi pagina". I’m going to call mine “Archived Posts Sitemap”. Io vado a chiamare mio "post archiviati Mappa del sito". I like that title because it says it’s an archive page with a sitemap. Mi piace quel titolo, perché dice che un archivio pagina con una mappa del sito. To me a sitemap is a great big categorized page of titles and links where you can get a the big picture of a site pretty quickly. Per me una mappa del sito è un grande classificato pagina dei titoli e dei link dove è possibile ottenere una grande immagine di un sito piuttosto rapidamente. That’s the impression I want to give people, unlike the monthly archive pages that just list posts and excerpts. È l'impressione che voglio dare alla gente, a differenza del mensile archivio pagine che solo elenco posti ed estratti. The first time creating this page I’m not going to give it much content - just some introductory content. La prima volta che la creazione di questa pagina non mi va di dare molto contenuto - solo alcuni introduttiva contenuto. Save this page and then reload your site in another tab or window. Salva questa pagina e quindi ricaricare il tuo sito in un'altra scheda o finestra. You should see the name of this new page in your “Pages” in your sidebar. Si dovrebbe vedere il nome di questa nuova pagina nel tuo "Pagine" nella tua sidebar. Click on it to bring it up and you should have something like this: Fai clic su di esso per portarla in alto e si dovrebbe avere qualcosa di simile a questo:

You see in that example what you get is a listing of archives by month, and also by subject (category). Potete vedere in questo esempio quello che si ottiene è una lista di archivi da mesi, e anche per argomento (categoria). This really sucks doesn’t it!? Questo davvero succhia non è!? I mean come on, everyone already has both of these already in their sidebar - I do! Mi riferisco a venire, ognuno ha già due di questi già in loro barra laterale - fare! There are basically two different ways to solve this problem, and actually these solutions can be combined. Ci sono fondamentalmente due modi diversi per risolvere questo problema, ed effettivamente queste soluzioni possono essere combinati. The first thing we can do is get a Wordpress plugin for archives to get more options on this page. La prima cosa che possiamo fare è ottenere un plugin per Wordpress archivi per ottenere più opzioni su questa pagina. The second is to do a little hackng and add some code to the page to get the information out of the database we need to make sure visitor’s get all the options they need. Il secondo è quello di fare un po 'di hackng e aggiungere un po' di codice alla pagina per ottenere le informazioni dei database di cui abbiamo bisogno per assicurarsi del visitatore ottenere tutte le opzioni di cui hanno bisogno.
After reviewing my options - these are my thoughts… Dopo aver esaminato le mie opzioni - questi sono i miei pensieri ...
I “could” use yesterday’s I "potrebbe" utilizzazione di ieri query_posts hack query_posts hack to list every post I have on the page - but that wouldn’t be very nice visually at all. elenco di ogni post ho sulla pagina - ma che non sarebbe molto piacevole a tutti i non vedenti. I think it would be great to give visitor’s most “most viewed” or “most popular” posts on this page. Penso che sarebbe grande per dare maggior parte del visitatore "più visti" o "più popolare" posti in questa pagina. I already have the most viewed top 10 in my sidebar. Ho già più visti top 10 nella mia barra laterale. I use the Io uso la Lester Chan Plugin WP-PostViews Lester Chan plugin wp-PostViews to get this. per arrivare a questo. It will display the most viewed posts, or most viewed posts for a category. Esso visualizza i post più visti, o più visti posti di categoria. I’m going to use it to display the top 25 most viewed posts. Io vado ad usarlo per visualizzare la top 25 dei più visti posti. That’s more than I have in my sidebar and should be very useful to visitor’s. Questo è più che ho nella mia barra laterale e dovrebbe essere molto utili per il visitatore. According to the Secondo la WP_PostViews documentation WP_PostViews documentazione all I need to do is add this code “outside the loop” of my archives.php to add this to my Master Archives Index Page (since I already ahve WP_PostViews installed as a plugin in my Wordpress installation): tutto quello che dovrete fare è aggiungere questo codice "al di fuori del circuito" del mio per archives.php aggiungere questo al mio Maestro Archivi Index Page (dal momento che hanno già installato come WP_PostViews un plugin nella mia installazione di Wordpress):
<h2>Top 25 Most Viewed Posts</h2> <?php if (function_exists('get_most_viewed')): ?> <?php get_most_viewed('both', 25) ?> <?php endif; ?> <br /><br /> Since you have to use that code outside the loop, and I have a page heading just inside the loop on my archives.php, I decided to place this after the loop in my Master Archives Index page. Poiché è necessario utilizzare il codice al di fuori del circuito, e ho una pagina voce solo all'interno del circuito archives.php sul mio, ho deciso di questo luogo dopo il loop nel mio Maestro Archivi Indice pagina. Another way to do this you might care for is by using the Un altro modo per fare questo è possibile per la cura è utilizzando il using the Top Post plugin utilizzando il plugin Top Post by JohnTP to display the top post by category like he does on da JohnTP per visualizzare il top post per categoria, come egli fa sul his top posts page il suo superiore posti di pagina . I decided to stick with what I have so far. Ho deciso di rimanere con ciò che ho finora.
Doing a little more research I found two very similar Wordpress Archiving Plugins, Facendo un po 'più di ricerca ho trovato due molto simili Wordpress Plugin archiviazione, SRG Clean Archives La SRG pulito archivi , and , E Smart Archives Smart Archivi . They basically do the same thing, just formatted a little differently. Essi fondamentalmente fare la stessa cosa, appena formattato un po 'diverso.
Here’sa clean archives example where you’ll see that you get monthly archives with linked titles and post counts. Ecco un esempio pulito archivi dove vedrai che si ottiene mensile archivi connessi con titoli e post conta. It also shows the day posted before and comment count after each linked title. Essa mostra inoltre pubblicato il giorno prima e dopo il commento contare ogni titolo collegati.

In the Smart Archives plugin example you’ll see an addition of a linked calendar above the posts by year and month. In Smart Archivi plugin di esempio verrà visualizzato un aggiunta di un calendario legato sopra i posti per anno e per mese. The posts are also listed by month. I posti sono elencati anche da mesi. With this plugin you don’t get date posted or comment count. Con questo plugin non si ottiene la data o il commento pubblicato contare.

In the end I wanted to go with something I thought was not only a bit more cool, but much more user-friedly. Alla fine ho voluto andare con qualcosa ho pensato non è stata solo un po 'più fresco, ma molto più user-friedly. I really wanted to use Ho veramente voluto utilizzare Exended Live Archive Exended vivere archivio because of the interface, but it’s not compatible with Wordpress 2.3+ at all. a causa della interfaccia, ma non è compatibile con Wordpress 2.3 + a tutti.
In the end I went with Alla fine mi sono recato con KG Archives KG Archivi for my Master Archives Index page because it has a handy drop down at the top where visitor’s can quickly choose to see one month or all months quickly of archived posts. per il mio Maestro Archivi Indice pagina perché ha un comodo menu a discesa nella parte superiore dove il visitatore può scegliere rapidamente per visualizzare un mese o ogni mese rapidamente di post archiviati. In addition this post lists the date posted and comment count for each as well. Oltre questo post elenca la data e il commento postato contare come per ogni bene.

To place the KG Archives content on your Master Archive Index Page you just have to copy and paste the following code - but this time go back and “edit” your actual “page” in “Manage->Pages” where you wrote the intro content, and paste this beneath (in code view): Per posizionare il KG Archivi contenuto sul tuo Master Archivio Index Page è sufficiente copiare e incollare il codice riportato di seguito - ma questa volta di tornare indietro e "modificare" il costo effettivo per "pagina" in "Gestione-> Pagine", dove hai scritto l'introduzione di contenuti , E, sotto questo incollare (in vista del codice):
<kgarchives initialmonth="current" /> I removed the original code I added at the beginning of this hack tutorial to get archives by month or subject in favor of the KG Archives sortable archive code. Ho rimosso il codice originale ho aggiunto all'inizio di questo hack tutorial per ottenere gli archivi per mese o soggetto a favore del KG Archivi ordinabili archivio codice. Based on all the options I presented to you in this post - you must decide which of all the layouts and plugins you like best for your archives index page. Basato su tutte le opzioni ho presentato a voi in questo post - è necessario decidere quale di tutti i layout e plug-ti piace di più per la tua pagina Indice archivi. View my new Guarda il mio nuovo Archived Posts Sitemap page here Archivio Interventi pagina Mappa del sito qui !
There are many other options in the readme file if you download this plugin, I chose to only display the current month at first. Ci sono molte altre opzioni nel file readme se si scarica questo plugin, ho scelto di visualizzare solo il mese in corso al primo. Now I have a Master Archive Index Page where users can navigate all my past posts quickly and easily. Ora ho un Master pagina Indice archivi in cui gli utenti possono navigare con tutti i miei ultimi posti in modo rapido e semplice. They can even see all posts on one page if they choose. Essi possono anche vedere tutti i post su una sola pagina, se lo desiderano. I’ve also listed my most popular posts. Sono elencati anche i miei post più popolari. If I keep adding pages, I may also expand my Archive Index to include a listing of all my parent and child pages at the very bottom. Se io continuo ad aggiungere pagine, mi possono anche espandere il mio indice archivio di includere una lista di tutti i miei genitore e bambino pagine al fondo. Create your own archive index now! Crea il tuo archivio indice ora! I gave you plenty of options, and as always if you have something to add or a question - please comment now! Mi ha dato un sacco di opzioni, e come al solito se hai qualcosa di aggiungere o di una questione - si prega di commentare ora!
Tags: Tag: archives archivi , plugin , tutorial , wordpress-hacks wordpress-hack
























June 19th, 2008 at 6:38 am Giugno 19, 2008 6:38 am
most awful blogging mistake: automatic translation. blogging più terribile errore: la traduzione automatica. it really SUCKS BIG TIME. è davvero SUCKS Big Time. I want to read your blog in english, idiot. Voglio leggere il tuo blog in italiano, idiota.
June 19th, 2008 at 7:46 am Giugno 19, 2008 7:46 am
@fdas - I don’t use or have automatic translation on this blog - you have to click one of the translation icons to get a translated page. @ ZDP - Io non uso o avere la traduzione automatica su questo blog - è necessario fare clic su una delle icone di traduzione per ottenere una pagina tradotta. Every single page is available by default in English. Ogni singola pagina è disponibile di default in inglese.
The idiot is the person that leaves a blog comment like this and uses random characters and a fake email address (you) so I can’t contact you and get to root of the issue you were having, and fix it for others if there was one. L'idiota è la persona che lascia un commento nel blog come questo e utilizza casuale caratteri e di un indirizzo e-mail falso (tu) in modo che io possa contattare l'utente non e arrivare a radice del problema è stato che hanno, e risolvere il problema per gli altri se non ci fosse uno.
June 30th, 2008 at 5:49 pm 30 giugno 2008 a 5:49 pm
Thanks for the info. Grazie per le informazioni. After staring at the codex for an hour wondering why I didn’t have a “templates” box on my Write >> Page, I figured out that the 5 lines of code I ripped away from the top of the archives.php was the problem. Dopo Staring al codice per un'ora chiedendo perché non ho avuto un "template" sulla mia casella Scrivi>> pagina, ho figurato che il 5 righe di codice ho strappato via dalla cima del archives.php è stato il problema .
For the record, page displays in perfect English for me and I can only figure that the other jerk followed a link from another site or something. Per la cronaca, a pagina visualizza in perfetto inglese per me e io posso solo cifra che le altre Jerk seguito un link da un altro sito o qualcosa del genere.
DrBrians last blog post.. DrBrians ultimo post sul blog .. Pardon the Dust… Perdono la polvere ...
August 9th, 2008 at 10:07 am 9 agosto 2008 a 10:07 am
Thanks for all your work; I am addicted. Grazie per tutto il vostro lavoro; io sono tossicodipendenti. Can’t believe that guy could see all your work then gripe at you. Non può credere che tizio potrebbe vedere tutti i vostri lavori quindi Gripe a voi.
Kims last blog post.. Kims ultimo post sul blog .. Google Insights Tool Approfondimenti strumento di Google