Posts per Cat is extension for WordPress that list titles for latest # post for all or top level categories on blog. Titles are grouped to boxes distributed in two columns.
- set how many boxes per row will be displayed (one, two, three or four)
- set number of post titles to display per category
- set category ID’s to exclude, or
- set category ID’s to include
- toggle displaying of child categories
- ordering boxes by category ID, title or custom
- toggle displaying excerpt above post title (for first post only, for all posts or none)
- toggle displaying featured image for posts
- toggle displaying number of comments (with link) added to post title
- toggle displaying sticky posts
- toggle usage of custom list CSS
- SEO optimized permalink URI’s
- integrate to template file, use shortcode
[[ppc]]with options or widget
- produces XHTML 1.1 valid code
- published under terms of GNU GPLv3
Or visit official WordPress.org page http://wordpress.org/plugins/posts-per-cat/
Posts Per Cat is easy to install, same as any other extension. You can do it manual or automatic.
- For manual installation: download, unpack archive and upload directory posts-per-cat to wp-content/plugins/ directory on your hosting server with some FTP client (I recommend free and safe FileZilla).
- For automatic installation: go to Plugins → Add New, enter keyword Posts per Cat, click Search button, then click link Install Now.
After activation on Plugins page, go to Settings → Posts per Cat and configure options per your preferences.
Then simply insert shortcode ppc outside of Loop in place where you wish to display Posts per Cat boxes. You can use widgets or even post/page content.
If you wish to add Posts per Cat boxes permanent, then use PHP code below in your template file (for example, to index.php just before closing tag for content):
<?php do_action('ppc'); ?>
You can insert shortcode
[[ppc]] to front page or other static pages or posts content. Here is set of options that you can set to shortcode and override default plugins settings:
- columns=2 – Number of columns (1, 2, 3 or 4)
- minh=0 – Minimal height of box (in px, set to 0 for auto)
- include=category_ID’s – Include category (comma separated category ID’s)
- exclude=category_ID’s – Exclude category (comma separated category ID’s)
- parent=0 – Only top level categories (0 or 1)
- order=ID – Order categories by (ID, name or custom)
- catonly=0 – Only from displayed category archive (0 or 1)
- noctlink=0 – Do not link category name (0 or 1)
- more=0 – Standalone link to archives (0 or 1)
- moretxt=”More from” – Archive link prefix
- posts=5 – Number of headlines per category block
- titlelen=34 – Headline length (in characters)
- shorten=0 – Shorten headline (0 or 1)
- commnum=0 – Display comment number (0 or 1)
- nosticky=0 – Hide sticky posts (0 or 1)
- excerpts=none – Show excerpt (none, first or all)
- content=0 – Use post content as excerpt (0 or 1)
- excleng=100 – Excerpt length
- thumb=0 – Show thumbnail with excerpt (0 or 1)
- tsize=60 – Thumbnail size, set size in px for thumbnail width (height is same)
Example of shortcode usage:
[[ppc columns=4 posts=7 include=49,1,38,29 thumb=1 tsize=150]]
- Number of columns: select preferred number of columns to organize category boxes into (one for full width, two, three or four)
- Minimal height of box: prevent bad positioning of boxes when some category have no enough posts to display.
- Show available categories: display table of categories with ID’s and number of posts inside, so you can easy identify categories to use in following options
- Include category: comma separated array of category ID’s to include = only that categories will be displayed
- Exclude category: comma separated array of category ID’s to exclude = display all but this categories
- Only top level categories: do not display subcategories
- Order categories by: descriptive enough. Sort categories by ID, Name or by order entered in Include category field
- Only from displayed category archive: exclude categories different from currently displayed on category archive and ignore first category rules on category archive
- Do not link category name: if disabled, category title will be linked to category page
- Archive link prefix: WHen previous option is enabled, link to category with this prefix will be displayed on the bottom of category box
- Number of headlines: how many post titles to display from category
- Headline length: set how many characters will have headline. If original is longer, text will be shortened to defined length.
- Shorten headline: enable this option if you wish to cut headline length to number of characters defined in previous option
- Display comment number: show number of comments at the end of headline
- Hide sticky posts: exclude sticky posts from headlines
- Show excerpt: do you wish to show excerpt from post?
- Use post content as excerpt: if no excerpt is set, use content to generate excerpt from content. If disabled, if no excerpt is set for post, nothing will be displayed for that post in PPC.
- Excerpt length: shorten excerpt to defined number of characters
- Show thumbnail with excerpt: when excerpts are enabled, show featured image from post
- Thumbnail size: set sife for featured image
We have some predefined style for Posts per Cat boxes. You can enable option Use PPC for styling list to include that styles to page. If disabled, style boxes in your theme’s style.css file.
Starting with version 1.2.0 we provide native widget with options that override default settings.
Future version 1.3.0 will come with:
- ReduxFramework for default plugin settings (implemented)
- Option to order and sort posts in category (implemented)
- Localized 100% of strings
You can download development version from here
And we appreciate your support
Spread voice about YouTube Channel on social networks, rate and review on WordPress.org, feedack in comments below or