Plugin Directory

Category Pages & Posts Shortcodes

Useful shortcodes to display a post or page content or a list of posts.

Category Pages & Posts Shortcodes is a complete rewrite of the "Category Page" plugin. It offers useful shortcodes to display a post or page content, or a list of posts. Also it allow exclusive mutual bind between a Category and a Page, in order to display the page content as "header" of category archives.

You can safely use shortcodes inside a post or a page, our you can embed them in your theme using the do_shortcode WordPress function like that:

<?php do_shortcode('[showsingle pageid="<id_of_page>"]'); ?>

NOTE: This plugin requires WordPress 3.4.x, and will break your current ~2.5 setup. It also won't be compatible with Category Page Extender anymore. On activation, it will clean every option set by the previous versions. Please test it offline first.

[showsingle pageid="" postid="" showheader="" header="" headerclass="" wrapper="" wrapperclass=""]

This shortcode will show a single post or page. The only required argument is either postid or pageid.

  • pageid - ID of the page you want to display (either this or postid)
  • postid - ID of the post you want to display (either this or pageid)
  • showheader - if "true", show the page title
  • header - level of title HTML header (from 1 to 6, 2 default)
  • headerclass - header custom CSS class (default: aptools-single-header)
  • wrapper - if "true", wraps the whole output with <div class="aptools-wrapper"></div>
  • wrapperclass - wrapper custom CSS class (default: aptools-wrapper)

[showlist catid="" lenght="" listclass="" excerpt="" wrapper="" wrapperclass=""]

This shortcode will show a list of posts from you. Required argument is catid.

  • catid - ID (not slug, nor name) of the category you want to list
  • lenght - how many posts listed (default: 10. don't set it too high..)
  • listclass - list element's custom CSS class (default: aptools-list)
  • excerpt - if true shows excerpt alongside title
  • wrapper - if "true", wraps the whole output with <div class="aptools-wrapper"></div>
  • wrapperclass - wrapper custom CSS class (default: aptools-wrapper)

[showauto]

This shortcode works only on category archives templates: it will display on each category the linked page content. You can set up the link either on the page edit admin area or in the category edit area. Please note: a single page can be linked this way to a single category only. If you need more flexible options you should take advantage of WordPress template hierarchy: you can create a category-<category_name>.php file with a [showsingle] shortcode.

GPL2(C) 2008+ SWER Sviluppo siti internet Torino

Git source code on Bitbucket

Support Forum on wordpress.org

Requires: 3.4.2 or higher
Compatible up to: 3.5.1
Last Updated: 2013-2-24
Downloads: 100,291

Ratings

3 stars
3.4 out of 5 stars

Support

0 of 4 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

2 people say it works.
0 people say it's broken.

100,1,1
50,12,6
57,7,4
40,10,4
38,8,3
100,1,1
0,1,0
29,7,2
0,2,0
50,2,1
25,4,1
0,1,0
0,3,0
67,3,2 100,2,2 67,3,2 100,1,1 100,3,3
50,2,1
100,2,2