Subscribe to RSS feed Subscribe to RSS feed or vai follow me sekojiet man on Twitter? on Twitter?
WordPress is WordPress ir one of viens no the most popular blogging software today. populārākie blogošana programmatūra šodien. One of its biggest problems is duplicate content creation. Viens no tās lielākajām problēmām ir dublēt satura veidošanā. It has been a major concern, and was noticed by WordPress developers. Tas ir lielas bažas, un pamanīja WordPress izstrādātāji. 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–>. Pievienoja jaunu funkciju, kuru jūs varētu pierādīt tikai daļa no amata lapās, izņemot pēc-lapa, izmantojot HTML komentāru <!-More->. 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. Jums nav iegūt jūsu rokās netīru, pievienojot kods - ievietojiet kursoru vietā, kur vēlaties ievietot tikt saīsināts, un noklikšķiniet uz vairākiem taga rindu pogas pēc redaktora.
The more tag inserts a link to the post at the place where the post is truncated. Vairāk tag ievieto saiti uz amata vietu, kurā sūtījums ir nogriezts. The default anchor text is quite boring – you would see the same text on a few million other blogs. Default Enkura teksts ir diezgan garlaicīgs - jūs varētu redzēt to pašu tekstu par dažiem miljoniem citu blogus. This can be customized to your taste, and is as easy as sipping tea(if you don't like it, drink coffee/beer). To var pielāgot savai gaumei, un ir tikpat vienkārša, kā dzer tēju (ja jums nepatīk tas, nedzert kafiju / alu).
Let's do it Let's do it
Here are the steps to customize the more tag: Šeit ir pasākumi, lai pielāgotu vairāk tag:
- In your theme files, open up
index.phpin any code editor, like Notepad, Notepad++ or Metapad. Jūsu theme failus, atvērtindex.phpjebkurā koda redaktoru, piemēram, Notepad, Notepad + + vai Metapad. - In it, find this bit of code (use Find function): Tajā atradīsiet šajā bitu kodu (izmantojiet Atrast funkcija):
<?php the_content(); ?>
This code may vary depending on the theme. Šo kodu var mainīties atkarībā no tēmas. However, it will contain the parts<?php the_contentTomēr tas ietver daļas<?php the_content - Replace that code with : Aizstāt minēto kodu ar:
<?php the_content(" (More...) "); ?> - (More…) is the text that will be displayed. (Vairāk ...) ir teksts, kas tiks rādīti. To customize it, replace the parts in bold to whatever you want. Pielāgot tā, aizvieto daļās treknrakstā, lai ko jūs vēlaties.
- Save the file and upload it to your server. Saglabājiet failu un augšupielādēt to uz jūsu serveri.
That's it. That's it. Hopefully, now you've got the text that you want. Cerams, tagad tev ir teksts, ko vēlaties. Wasn't it easy? Nebija viegli? I told ya' so… Es teicu ya ', tāpēc ...
Related reading Related lasījums
- How To: Install WordPress on Windows How To: Install WordPress Windows
- Is domination of WordPress and FeedBurner good? Vai kundzību WordPress un FeedBurner labs?
- WordPress core dump files WordPress kodols dump failu
- Delete post revisions in WordPress Dzēst post pārskatīšanas WordPress
Is it also called expandable post summary? Vai tā arī sauc paplašināms post kopsavilkums?
I Would suggest you to use Excerpts in front page rather than More. Es ieteiktu Jums izmantot fragmentu sākumlapā, nevis vairāk. Both does the job, but still excerpts does it better. Gan nav darbs, bet vēl fragmentāri tas labāk.
@Nirmal: Actually, I use neither more tag nor excerpts. @ Nirmal: Patiesībā, es izmantot ne vairāk tag ne fragmentāri. I use Evermore plugin . I use mūžīgi spraudni. It is similar to excerpts, but the advantage is that it does not cut off posts indiscreetly, as in the middle of a paragraph. Ir līdzīgas fragmentāri, bet priekšrocība ir tā, ka tas nav nogriezts posts indiscreetly tāpat kā vidū punktu.
@Ashwini: I believe you are talking about expandable post in Blogger. @ Ashwini: "Es ticu, ka jūs runājat par paplašināms post in Blogger. This is different – only applicable for WP. Tas atšķiras - tikai piemērojama WP. It means that only a portion of the post will be shown on any page other than the single(post)page. Tas nozīmē, ka tikai daļa no amata būs redzams nevienā lapā, izņemot vienu (pēc) lapā.
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 post ir atšķirīga, jo tā rāda pilnu saturu noklikšķinot, kā arī tā ir pilna satura pirmkods, kas nozīmē ne SEO pabalstu, to izmantojot.