Subscribe to RSS feed Prenumerera på RSS-flöde or eller follow me Följ mig on Twitter? på Twitter?
WordPress is WordPress är one of en av the most popular blogging software today. de mest populära bloggar programvara idag. One of its biggest problems is duplicate content creation. En av dess största problem är dubbletter skapas. It has been a major concern, and was noticed by WordPress developers. Det har varit ett stort bekymmer, och uppmärksammades av WordPress utvecklare. They added a new feature, whereby you could show just part of the post on pages other than post-page, by using the HTML comment <!-more–>. De lade till en ny funktion, där du kan visa bara en del av tjänsten på sidorna än post-sidan, med hjälp av HTML-kommentar <!-Mer->. You do not have to get your hands dirty by adding the code – just place the cursor where you want the post to be truncated, and click the more tag in the row of buttons in post-editor. Du behöver inte få händerna smutsiga genom att lägga till kod - bara placera markören där du vill att inlägget ska trunkerade och klicka på mer tagg i rad med knappar i efterhand redaktör.
The more tag inserts a link to the post at the place where the post is truncated. Ju mer taggen infogar en länk till tjänsten på den plats där tjänsten är stympad. The default anchor text is quite boring – you would see the same text on a few million other blogs. Standardalternativet förankra texten är ganska tråkiga - du skulle se samma text på ett par miljoner andra bloggar. This can be customized to your taste, and is as easy as sipping tea(if you don't like it, drink coffee/beer). Detta kan anpassas till din smak, och är lika enkelt som sipping te (om du inte gillar det, dricker kaffe / öl).
Let's do it Låt oss göra det
Here are the steps to customize the more tag: Här är stegen för att anpassa mer tag:
- In your theme files, open up
index.phpin any code editor, like Notepad, Notepad++ or Metapad. I ditt tema filer öppnaindex.phpi någon kod editor, t.ex. Anteckningar, Notepad + + eller Metapad. - In it, find this bit of code (use Find function): I den finner detta kodsnutten (använd Sök-funktionen):
<?php the_content(); ?>
This code may vary depending on the theme. Den här koden kan variera beroende på temat. However, it will contain the parts<?php the_contentMen det kommer att innehålla delar<?php the_content - Replace that code with : Ersätt denna kod:
<?php the_content(" (More...) "); ?> - (More…) is the text that will be displayed. (Mer ...) är den text som kommer att visas. To customize it, replace the parts in bold to whatever you want. För att anpassa den, ersätta delar i fetstil till vad du vill.
- Save the file and upload it to your server. Spara filen och ladda upp den till servern.
That's it. That's it. Hopefully, now you've got the text that you want. Förhoppningen är nu du har den text som du vill. Wasn't it easy? Var inte det enkelt? I told ya' so… Jag sa till dig "så ...
Is it also called expandable post summary? Är det också kallas expandable post sammanfattning?
I Would suggest you to use Excerpts in front page rather than More. Jag föreslår att du använder Utdrag framför sida snarare än mer. Both does the job, but still excerpts does it better. Båda gör jobbet, men ändå inslag gör det bättre.
@Nirmal: Actually, I use neither more tag nor excerpts. @ Nirmal: Faktiskt, jag använder varken mer tagg eller inslag. I use Evermore plugin . Jag använder alltmer plugin. It is similar to excerpts, but the advantage is that it does not cut off posts indiscreetly, as in the middle of a paragraph. Det är liknande inslag, men fördelen är att den inte bryter tjänster indiscreetly, som mitt i ett stycke.
@Ashwini: I believe you are talking about expandable post in Blogger. @ Ashwini: Jag tror ni talar om utökningsbar tjänst i Blogger. This is different – only applicable for WP. Detta är olika - endast gäller för WP. It means that only a portion of the post will be shown on any page other than the single(post)page. Det innebär att endast en del av tjänsten kommer att visas på en sida än den enda (post) sida.
Expandable post is different in that it shows the full content on clicking, and also it has full content in the source code, meaning no SEO benefits by using it. Expandable tjänst är annorlunda i det att den visar hela innehållet på att klicka och även det har hela innehållet i källkoden, vilket innebär ingen SEO fördelarna med det.