Posts per Cat

Šta je Posts per Cat?

Posts per Cat je dodatak za WordPress platformu za blogovanje koji omogućava listanje poslednjih N naslova za sve ili samo za kategorije najvišeg nivoa na blogu. Naslove po kategorijama grupiše u kućice i slaže ih u dve kolone.

Odakle da preuzmem Posts per Cat?

Posts per Cat u verziji 0.0.14 možete preuzeti odavde: Posts per Cat 0.0.14 (104) ili iz Vordpres riznice na adresi http://wordpress.org/extend/plugins/posts-per-cat/.

Ovaj dodatak nastao je kao rezultat davanja primera polaznicima druge generacije Škole veb novinarstva o izmeni i unapređivanju naslovne stranice bloga.

Kako se instalira?

Preuzetu datoteku raspakujte pomoću arhivera (preporučujem program 7zip), a potom dobijeni direktorijum posts-per-cat/ pomoću FTP klijenta (preporučujem program FileZilla) postavite na server u direktorijum wp-content/plugins/ Vaše Vordpres instalacije.

Ako koristite Vordpres 2.9 ili noviji, instalaciju obavite sledeći donje video uputstvo.

Podešavanja dodatka

Kao što ste u gornjem video uputstvu mogli da vidite, podešavanja dodatka Posts per Cat vrše se u odeljku Kontrolne table do koga se dolazi preko menija Podešavanja → Članci po kategorijama.

Pozicija dodatka Posts per Cat u meniju Podešavanja

Pozicija dodatka Posts per Cat u meniju Podešavanja

Opcije za podešavanja podeljene su u četiri sekcije — Kutije, Opcije kategorija, Postavke članaka i Opciono.

Posts-per-Cat 0.0.10: Stranica za podešavanja

Posts-per-Cat 0.0.10: Stranica za podešavanja

Kutije

U odeljku Kutije određuje se minimalna visina kućice koja sadrži izlistane naslove članaka, kao i broj kolona po redu. Podrazumevano se prikazuju dve kolone (kućice) po redu, dok se opciono može izabrati prikaz jedne kućice po redu, razvučene celom širinom članka.

Opcije kategorija

U ovom odeljku mogu se odrediti kategorije koje će jedino biti prikazane, odn. sakrivene, da li će se prikazivati samo kategorije najvišeg nivoa, te po čemu će se vršiti sortiranje kućica (po ID broju ili nazivu kategorije).

Postavke članaka

Karakteristike izlistanih članaka određuju se u sekciji Postavke članaka. Može se odrediti broj članaka čiji će naslovi biti izlistani, opciona dužina naslova u karakterima sa opcijom za aktiviranje skraćivanja dugačkih naslova. Ako na blogu postoje istaknuti članci (eng. Sticky posts), oni se mogu sakriti iz listanja aktiviranjem odgovarajuće opcije.

Ovde se takođe može izabrati opciono prikazivanje sažetaka članaka sa sve ili samo prvi članak u kućici. Takođe se može odrediti dužina sažetka u karakterima.

Opciono

Ukoliko nije uključena opcija za primenu stila nabrajanja koji dolazi uz Posts-per-Cat, biće upotrebljen podrazumevani stil teme koji u neki mtemama može izgledati loše. Da bi rešili takav problem uključite opciju za primenu PPC stilova u ovoj sekciji.

Kako se koristi?

Za upotrebu, t.j. prikaz kućica sa kategorijama na blogu, neophodno je dodati jednu liniju kôda za pozivanje Posts per Cat funkcije za štampanje sadržaja.

Jednostavno u šablon teme treba umetnuti sledeći kôd na mesto gde se želi dobiti spisak naslova po kategorijama:

<?php do_action("ppc"); ?>

Preporučujem da ovaj kôd umetnete u šablon glavnog indeksa (datoteka indeks.php) iza paginacije:

	<?php endif; ?>
<?php do_action("ppc"); ?>
	</div>

Kako izgleda?

Kada ste dodatak instalirali, podesili ga i dodali na željeno mesto, dobićete nešto nalik na sledeće dve slike.

Posts-per-Cat 0.0.10: Podrazumevani prikaz dve kolone

Posts-per-Cat 0.0.10: Podrazumevani prikaz dve kolone

Posts-per-Cat 0.0.10: Opcioni prikaz u jednoj koloni celom širinom

Posts-per-Cat 0.0.10: Opcioni prikaz u jednoj koloni celom širinom

Karakteristike

  • podesiv broj naslova po kategoriji
  • izbor listanja ili zaobilaženja naslova iz određenih kategorija
  • izbor prikaza naslova iz kategorija najvišeg nivoa
  • izbor poretka kategorija (ID ili naziv)
  • određivanje dužine naslova i sažetka članka
  • određivanje minimalne visine kućice za kategoriju
  • prikaz dve kolone po redu ili samo jedne kolone celom širinom
  • koristi sopstveni CSS koji se izmenom može prilagoditi potrebama korisnika
  • preveden na srpski jezik (podrazumevani jezik je engleski)
  • daje validan XHTML 1.1 kôd
  • objavljen pod GNU GPLv3 licencom

Urađeno

  • prilagođeno za Vordpres 3.1, dodata lokalizacija na francuski jezik zahvaljujući Pepita Pop 0.0.14 (2011-04-09)
  • rešen problem sa putanjom do CSS-a u instalacijama Vordpresa koje nisu u korenom direktorijumu domena 0.0.13 (2010-05-27)
  • otklonjen problem sa punom širinom kutije u IE6 0.0.12 (2010-05-18)
  • dodato rešenje za skraćivanje UTF8 teksta na serverima koji nemaju PHP funkciju mb_strlen(), dodata opcija za filtriranje kategorija na stranici arhive, dodata opcija za prikaz umanjene slike sa sažecima, dodata opcija za prikaz samostalne veze do arhive kategorije 0.0.11 (2010-04-24)
  • dodata opcija za prikaz dve kolone po redu (podrazumevano) ili samo jedne kolone celom širinom (opciono) 0.0.10 (07.01.2010)
  • ceo naziv članka kao veza do članka, otklonjena greška koja proizvodi nevalidan XHTML kôd 0.0.9 (09.10.2009)
  • dodat izbor kategorija koje će biti, odn. neće biti izlistane, prikaz sažetka za prvi ili sve članke u kategoriji, skraćivanje naslova i sažetka zapisa na željenu dužinu, određivanje minimalne visine kućice kategorije, permalinkovi za kategorije i članke 0.0.8 (26.09.2009)
  • dodat action hook ppc, dodatak objavljen u Vordpres riznici 0.0.7 (04.03.2009)
  • ispravljena greška za CSS URI na podstranama 0.0.6 (03.03.2009)
  • dodata opcija za upotrebu pripadajućeg CSS stila za liste 0.0.5 (20.02.2009)
  • sređen problem sa pozicioniranjem i listama 0.0.4 (20.02.2009)
  • objavljeno probno izdanje 0.0.3 (16.02.2009)

107 Responses

  1. pep
    pep 25. May 2010. at 06:49 · Reply

    Many thanks for taking the time.

    Here’s the blog : http://www.enfants-spectacle.com/
    I have changed back to full title but when I select ‘shorten’ the display is the same as far as the rows and boxes are concerned (but the title does shorten).

  2. pep
    pep 25. May 2010. at 16:03 · Reply

    Thanks again.
    There is a real ppc.css in the folder (i downloaded it and checked it was not empty).
    I tried to add the php code you mentioned in the index.php of my template, did not work either (and I tried in the page.php as well since I use the plugin in a page, did not work either).
    It’s weird…
    I have no idea what to do.

  3. pep
    pep 26. May 2010. at 22:11 · Reply

    Hi Alexander, thank you so much.
    I tired that : the code in the default theme’s index.php.
    It did not work.

    So I begin wondering if there isn’t a conflict between several plugins…If I find, I’ll let you know.

    Thanks any how !

  4. pep
    pep 27. May 2010. at 20:37 · Reply

    Whoooaaaooo ! You’re the best ! It works !
    Thank you soooo much !

    By the way, if you plan to have it translated into French someday, I’d be glad to help. Contact me on my email.

  5. Yurckk
    Yurckk 6. July 2010. at 21:20 · Reply

    Hello, do you have the English version one? I think this might the exact tutorial I’ve been looking for. I hope you have it in english, thanks in advance!

  6. bouba
    bouba 9. July 2010. at 01:12 · Reply

    is it possible to add a post date? Nice work. Thanks.

  7. bouba
    bouba 9. July 2010. at 16:47 · Reply

    @Aleksandar:

    Ah, yes, very nice.

    I wondered if the date could be inserted right next to the actual post.

    Thanks again.

  8. bouba
    bouba 9. July 2010. at 18:24 · Reply

    @Aleksandar:

    Thanks a lot for answering.

    The options would be to have the date (or time, or both) appear at the end of the post title (or at the beginning), as in:

    “this is the post” – June 10, 2010

    I hope this makes sense.

  9. bouba
    bouba 13. July 2010. at 16:39 · Reply

    @bouba:

    I’ve used the following to display the date:

    echo $clanak->post_date;

    How would I format the output?

  10. bouba
    bouba 18. July 2010. at 13:38 · Reply

    @Aleksandar:

    Fnatastic! Supach! Thanks very much.

  11. Gabe Barber
    Gabe Barber 12. November 2010. at 21:04 · Reply

    Dear Aleksandar,
    Thank you for this fabulous plugin, it did exactly what I was looking for! A couple questions:
    1) Is there a way to get it to not show the category title at the top of the box?
    2) Is there a way to get it to show the author of the post alongside the title of the post?

    Thank you again for this fantastic plugin! Do you have a paypal or donation page set up? I would be more than happy to send something your way, for the time you’ve saved me!

    All the Best,
    Gabe Barber
    Reading Local

  12. Jeff Buchanan
    Jeff Buchanan 22. December 2010. at 17:37 · Reply

    In Google Chrome, the lists appear as a courier-type font that is different from what is in my theme. I corrected this by adding a font-family definer in the posts-per-cat/ppc-list.css. Add it in the /*list style*/ section of the plug-in:

    /* list style */
    #ppc-box .ppc-box .ppc ul {
    font-family: Arial, Tahoma, Verdana;
    list-style: none;
    margin: 0;
    padding: 0;
    }

    Hope that helps some others.

  13. Jeff Buchanan
    Jeff Buchanan 22. December 2010. at 17:55 · Reply

    Is there a way to have the lists ordered alphabetically?

  14. Irit
    Irit 30. January 2011. at 22:29 · Reply

    Hi

    I use your widget on my page, but it does not work as expected.

    1) there are no excerpts (by the way: is this able to work with the more-tag?)

    2) one of my categories (Schöne Sachen with pics on the right inner sidebar) is not shown – no categroy, no articles, no thumbnails

    Any ideas?

    This would be very helpful, this is just the widget I need for my page

    Thanks!

  15. Irit
    Irit 30. January 2011. at 23:39 · Reply

    wow, quickest answer ever!

    Excerpts are no problem, there is this extra area in the article I think?

    Any workaround for the subcategory-issue – perhaps I can add another category just for this and ignore it otherwise

  16. Irit
    Irit 31. January 2011. at 00:03 · Reply

    I played around a bit and the exceprts work. But the thumbnails do not work?

    And I unchecked the “top level categorie”….

  17. Krzysztof Frendorf
    Krzysztof Frendorf 2. May 2011. at 12:07 · Reply

    Hi I repeat question asked before:

    Is there a way to have the posts list displayed alphabetically?

    Would be a great feature.

    Thanks,

    K.

  18. danco
    danco 11. August 2011. at 20:29 · Reply

    sta ima novo razvojna verzija plugina?

  19. my honest answer
    my honest answer 21. October 2011. at 16:14 · Reply

    Hi,

    I’m trying to use PPC on a page, but I just can’t work out how to do it! I just want one page, and all I want on it is PPC. I tried inserting with code tags around it, but obviously I need to put the code in my theme somewhere. But I can’t work out where to put it since I just want it on one page, not at the end of every post. Anyone got any quick tips on how to do it?

    Thanks so much.

  20. Opal
    Opal 16. January 2012. at 16:47 · Reply

    I would like to use your plugin for my ecommerce store. But it is made for bringing up posts. Is there a way to bring up all the product posts? Please let me know. I use your plugin for other website and they work well. Thank you.

  21. Opal
    Opal 30. January 2012. at 19:55 · Reply

    Still waiting for a reply. Thank you.

  22. Opal
    Opal 2. February 2012. at 19:41 · Reply

    I used your plugin for other sites and it works great. For this site, we use jigoshop to post products. It is not post, it is product post. I believe.
    I would like to use your plugin to bring up all the product categories and product post names under categories. Is it possible?
    Thank you.

  23. Sava
    Sava 4. April 2012. at 18:37 · Reply

    Aleksandre,
    sve pohvale za plugin. Imam jedno pitanje. Da li je, i kako, moguće da se
    naslovi članaka u okviru plugina bolduju? Pokušavao sam nešto u css fajlu, ali nisam uspeo. Ako je moguće, zamolio bih Vas za detaljnije objašnjenje.
    Hvala unapred.
    Pozdrav.

  24. Sava
    Sava 5. May 2012. at 16:21 · Reply

    Aleksandre,
    da li je moguće, i kako, promeniti boju linka u naslovu pojedinih članaka?
    Trenutno su linkovi crveni, a trebaju mi ili crni ili tamno plavi.
    Hvala Vam unapred.
    Pozdrav.

  25. Annette Washington
    Annette Washington 18. May 2012. at 16:17 · Reply

    Can I use this on more than one page? I would like different categories to show on different pages.

  26. marek
    marek 10. July 2012. at 01:36 · Reply

    Hello, I would like to ask how to print the excerpt(thumbnail) for the first post before the post title, and also how can I add the permalink of the post to the exceprt. Thanks a lot

  27. Joe
    Joe 10. October 2012. at 15:16 · Reply

    Hi there,
    I’d like to link the thumbnail to the article. Just like the headline. What do I need to add to the code?

  28. Pablo
    Pablo 26. October 2012. at 04:09 · Reply

    Hi, i like your plugin and am thinking about a page to display it on my site. However, I have another problem: I would like to limit the posts that are displayed on my category and tag pages. I can’t find any plugin that does that and wonder why. Do you have any suggestions?
    Thank you in advance
    Pablo

Leave a Reply