Subscribe to RSS feed Abonneren op RSS-feed or of follow me follow me on Twitter? op Twitter?
Duplicate content is a serious issue for all WordPress blogs, and most bloggers now employ different methods to show partial content. Duplicate content is een ernstig probleem voor alle WordPress blogs, en de meeste bloggers nu verschillende methodes om gedeeltelijke inhoud te tonen. The only blogs with good search rankings which employ full posts, are usually authority blogs, which are labelled as safe and authoritative by Google's algorithm. De enige blogs met een goede zoeken ranglijst die de volledige berichten in dienst hebben, zijn meestal gezag blogs, die worden gekenmerkt als veilig en gezaghebbende door algoritme van Google.
Plugins are a popular method to reduce duplicate content. Plugins zijn een populaire methode om dubbele inhoud te verminderen. However, plugins are not Echter, plugins zijn niet fully optimized volledig geoptimaliseerd , and consumes more server resources than the simple <?php the_excerpt() ?> tag. En server verbruikt meer middelen dan de eenvoudige <?php the_excerpt() ?> Moreover, excerpt tag can use the customized post summary that you may have written. Bovendien kan uittreksel tag gebruik maken van de aangepaste post samenvatting die u hebt geschreven.
In this short tutorial, you should have all the template files in one place. In deze korte tutorial, moet u alle bestanden sjabloon in een plaats. Once you have those files(probably downloaded from your server, or a local copy that you keep), follow these easy steps: Zodra u deze bestanden hebt (waarschijnlijk gedownload van uw server, of een lokale kopie die u houden), volgt u deze eenvoudige stappen:
- Open up
index.php,archive.phpandsearch.phpOpenindex.php archive.phpensearch.php - In each of these files, search and find the code bit that contains
<php the_contentIn elk van deze bestanden, zoek en vind de code bit dat bevat<php the_content - Replace the entire tag – usually <?php the_content(__('Read the rest of this entry'));?> (may change depending on theme, but will be similar), with this tag: Vervang de gehele tag - meestal <? Php the_content (__(' Lees de rest van dit item'));?> (kan veranderen, afhankelijk van thema, maar zal vergelijkbaar), met deze tag:
<?php the_excerpt();?> <? php the_excerpt ();?>
Save the files. Sla de bestanden. - Open up
index.phpagain, and save it ascategory.php(do not discardindex.php). Openindex.phpweer, en sla het op alscategory.php(niet ontdoenindex.php
In the above steps, we have replaced the content tag with the excerpt tag so that only a short paragraph of the post is shown on pages other than the post page. In de bovenstaande stappen, hebben we vervangen door de inhoud met de tag fragment tag, zodat slechts een korte paragraaf van het bericht wordt weergegeven op pagina's van andere dan de post pagina. Most themes lack a category.php , and its absence can allow full posts on category pages. De meeste thema's niet over een category.php en de afwezigheid ervan kan toestaan volledige berichten op categorie pagina's. By duplicating the index.php file(which has excerpt tag), that problem is also solved. Door herhaling van de index.php bestand (dat uittreksel tag heeft), dat probleem ook opgelost.
Open Mic Open Mic
How do you prevent duplicate content? Hoe voorkomt u dubbele inhoud? Do you use this method, or any plugins? Heeft u deze methode gebruikt, of plugins? If so, why do you prefer it over the excerpt tag?(I'd like to hear, as I am myself confused at which method to choose). Zo ja, waarom verkiest u het over het uittreksel tag? (Ik zou willen horen, want ik ben zelf in de war op welke methode te kiezen). Do tell me your views through comments. Zeg me uw ideeën via opmerkingen.
Related reading Betrokken lezing
- Plugins to enhance WordPress tagging Plugins te verbeteren WordPress tagging
- Search and remove duplicate files with Duplicate File Searcher Zoek en verwijder dubbele bestanden met Duplicate File Searcher
- Check Places Firefox addon checks offline and duplicate bookmarks Check plaatsen Firefox addon controles offline en dubbele bladwijzers
- Free GIMP plugins Gratis GIMP plugins
This is exactly what I have been doing. Dit is precies wat ik heb gedaan. Use post excerpts. Gebruik berichtfragment.
@Nirmal: Glad to hear your opinion. @ Nirmal: Glad uw mening horen. Could you be more specific as to why you prefer it? Kunt u meer specifiek over de redenen waarom u liever?
Funny to run into this, I'd just blogged about something similar yesterday! Grappige te lopen in deze, zou ik geblogd over iets dergelijks gisteren! And you did this 2 days earlier – guess it was a repeat for you to read my feed then! En je deed dit 2 dagen eerder - guess het was een herhaling voor u mijn feed te lezen dan!
[Goes over to subscribe to your feed] [Goes over te abonneren op je feed]
But I'd just like to make one clarification though – you won't need category.php if you have archive.php or index.php (err, you'd certainly have this one!). Maar ik wil graag een verduidelijking al - u niet nodig category.php maken als je archive.php of index.php hebben (err, je zou zeker deze!). What I meant was – if you are going to show excerpts on index.php, you can avoid having archive.php and category.php altogether – don't ask me why not, saves you 4kb on your webspace Wat ik bedoelde was - als u gaat fragmenten op index.php weergeven, kunt u voorkomen dat archive.php en category.php totaal - vraag me niet waarom niet, bespaart u op uw webruimte 4kb
The order is: De volgorde is:
1. 1. category-xx.php categorie-xx.php
2. 2. category.php category.php
3. 3. archive.php archive.php
4. 4. index.php index.php
If you'd like to make one particular category look unique, you can create a file with the category-CATEGORYNUMBER.php and that particular category would follow this template. Als u wilt een bepaalde categorie te laten lijken uniek, kunt u een bestand met de categorie-CATEGORYNUMBER.php en dat bepaalde categorie zou volgen deze sjabloon. If it doesn't find this file, it will check if the next file in the hierarchy is there and so on. Als het niet dit bestand te vinden, zal het controleren of het volgende bestand in de hiërarchie is er en zo verder.
Sorry about the overly long comment, I had to make myself clear! Sorry voor de overdreven lange reactie, had ik voor mezelf duidelijk te maken!
@Karthik: No problem whatsoever about long comments – I love 'em! @ Karthik: Geen enkel probleem over de lange reacties - I love 'em!
Well, that thing about category-xx.php was something new to me, thanks. Nou, dat ding over de categorie-xx.php was iets nieuw voor mij, bedankt. And category no. En categorie nee. means its ID, right? betekent het ID, toch?
As for 4kB webspace, lol Wat 4KB webruimte, lol
Yup, sorry, I should have mentioned ID there! Yup, sorry, ik heb gezegd er ID!
@Karthik: No problem, its understood. @ Karthik: Geen probleem, zijn begrepen. Now that you've clarified it, readers will also understand. Nu dat je het hebt verduidelijkt, zal de lezers ook begrijpen.
My recommendation would be to do this but also have unique content in the excerpt. Mijn aanbeveling zou zijn om dit maar hebben ook unieke content doen in het fragment.
I have actually switched categories off entirely and have opted for pages instead. Ik heb eigenlijk ingeschakeld categorieën uitgeschakeld geheel en hebben gekozen voor pagina's in plaats.
(Note the blog above is not an example of this ;-D ) (Let op de blog hierboven is niet een voorbeeld van dit;-D)