Posts in Page


To 'pull' posts into a page, you can either:

  1. place a shortcode in the editor window of the page you're editing, or
  2. modify a theme template file using the shortcode in a PHP function.

Using Shortcodes in the WordPress editor

  • [ic_add_posts] - Add all posts to a page (limit to what number posts in WordPress is set to), essentially adds blog "page" to page.
  • [ic_add_posts ids='1,2,3'] - show one or many posts by specifying the post ID(s) ( specify all post types )
  • [ic_add_posts post_type='post_type'] - show posts from a custom post type by specifying the post type slug ( must give post type if not a standard post ) add multiple post types by separating with commas (ex. post_type='post_type1,post_type2')
  • [ic_add_posts showposts='5'] - limit number of posts (or override default setting)
  • [ic_add_posts orderby='title' order='ASC'] - orderby title - supports all WP orderby variables. Order is optional, WP default
  • [ic_add_posts category='category-slug'] - Show posts within a specific category. Uses slugs, can have multiple but separate by commas. category-1,category2, etc (no spaces.)
  • [ic_add_posts tag='tag-slug'] - Show posts using a specific tag. Like categories, it uses slugs, and can accommodate multiple tags separate by commas. tag-1,tag-2, etc (no spaces.)
  • [ic_add_posts tax='taxonomy' term='term'] - limit posts to those that exist in a taxonomy and have a specific term. Both are required for either one to work
  • [ic_add_posts template='template-in-theme-dir.php'] - In case you want to style your markup, add meta data, etc. Each shortcode can reference a different template. These templates must exist in the theme directory.

Or any combination of the above.

Using Shortcodes within a PHP function

If you'd like to use this plugin to pull posts directly into your theme's template files, you can drop the following WordPress function in your template files, replacing the [shortcode] part with your, custom shortcode.

<?php echo do_shortcode("[shortcode]"); ?>