WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Posts in Page

Easily add one or more posts to any page using simple shortcodes.

You can install from within WordPress using the Plugin/Add New feature, or if you wish to manually install:

  1. Download the plugin.
  2. Upload the entire posts-in-page directory to your plugins folder
  3. Activate the plugin from the plugin page in your WordPress Dashboard
  4. Start embedding posts in whatever pages you like using shortcodes.

Shortcode Usage

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 is 'DESC'.
  • [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 exclude_category='category-slug'] - Exclude posts within specific category. Uses slugs, can have multiple slugs seperated 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.
  • [ic_add_posts ignore_sticky_posts='no'] - Show sticky posts too (they're ignored by default).
  • [ic_add_posts paginate='yes'] - use pagination links (off by default)

Or any combination of the above.

Shortcode Examples

Not sure how to use the shortcodes above to get what you want? Here are a few examples to get you started:

** Example 1 **

Let's say you want to pull a specific post called "What I love about coffee", which has a post ID of 34, somewhere on your About Us page. Your shortcode should look like this:

[ic_add_posts ids='34']

** Example 2 **

Alright, now lets say that you want to pull in all posts from two categories into your WordPress page. One category is WordPress Rocks and the other is WordPress Rolls. Plus, you'd like to display them three per page, rather than the default number of posts. Depending on your category slugs, your shortcode should probably look like this:

[ic_add_posts category='wordpress-rocks,wordpress-rolls' showposts='3']

** Example 3 **

Now, you're ambitious and want to try something complex. Let's say you've got a page called Plugins Are Awesome and, in it, you want to pull in posts that match the following criteria:

  • posts from a custom post type called Testimonials,
  • posts that are in the Testimonial Type custom taxonomy using the term Customer,
  • you want to display six testimonials per page,
  • you'd like them displayed in ascending order,
  • finally, you've created a custom template to use in presenting these posts and named it my-posts-in-page-template.php

Your shortcode might look like this:

[ic_add_posts showposts='6' post_type='testimonials' tax='testimonial-type' term='customer' order='ASC' template='my-posts-in-page-template.php']

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]"); ?>

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-9-26
Downloads: 78,461

Ratings

4 stars
4.7 out of 5 stars

Support

3 of 11 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

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

100,1,1
100,1,1
100,1,1 100,2,2 100,1,1
100,2,2 100,1,1
100,3,3
50,2,1 100,9,9
100,1,1
50,4,2
100,1,1
50,2,1
67,3,2
100,3,3
100,2,2