Pippins Plugins
  • Email
  • Facebook
  • Feedburner
  • Github
  • Google
  • Twitter
  • Vimeo
  • Youtube
  • Rss
  • About
  • News
  • Join the Site
    • Member Benefits
    • Member Plugins
    • Email Notifications
  • Plugin Store
    • Affiliate Area
    • Checkout
  • Plugins
    • Plugin Portfolio
      • Plugin Portfolio – List View
    • Free
    • Premium
    • Member Plugins
    • Coding Standards
    • Get Plugin Support
  • Tutorials
    • Series
      • Plugin Development 101
      • Creating a User Follow System Plugin
      • Customizing Restrict Content Pro
      • Displaying Content with Easy Content Types
      • Writing Your First WordPress Plugins, Basic to Advanced
      • Working with Widgets
      • User Submitted Image Galleries
      • Plugin Thoughts
      • Integrating Stripe.com with WordPress
      • WordPress Rewrite API
    • Member Exclusive
      • Free Members
      • Subscriber Only
    • Difficulty
      • Beginner
      • Intermediate
      • Advanced
    • Action and Filter Hooks
    • Ajax
    • Custom Post Types
    • External APIs
    • Short Codes
    • Taxonomies
    • Video Tutorials
    • Widget Tutorials
    • WordPress Admin / Dashboard
    • Working with jQuery
    • WordPress Database
    • Writing Plugins
    • Tag Index
  • Reviews
  • Support Forum
  • Contact
    • Support the Site
    • Request Code Review
    • Plugin Support

Show Posts with a Short Code and Display Posts in Any Page

Posted on September 15, 2011 by Pippin in Free Members, Intermediate, Member Restricted, Short Codes, Taxonomies, Tutorials, Video Tutorials 2 Comments
Home» Member Restricted » Free Members » Show Posts with a Short Code and Display Posts in Any Page
Tweet
Love It - 1

Being able to display a list of posts within a page (or other post) is very useful. In this tutorial I’m going to show you how to write a simple post query short code that will allow you to display a list of posts from any category, tag, or custom taxonomy.


I apologize if I move a little quickly in the video, I was limited for time.

Our final code:

You must be logged in to view the rest of this content. Register or login from the sidebar.

Tweet Follow @pippinsplugins
query_posts, short code, shortcode

2 comments on “Show Posts with a Short Code and Display Posts in Any Page”

  1. guvner says:
    January 28, 2013 at 4:54 pm

    Thanks for this Pippin – just what I needed.

    I found that the plugin defaults to displaying just 5 posts so for anyone who wants to show more, just edit line 37 and include the numberposts argument as follows:

    $post_args = array('tax_query' => $tax_query, 'numberposts' => 10, );

    Mike :)

    Reply
  2. dave says:
    March 23, 2013 at 5:06 pm

    Excellent thank you Pippin, your post has helped me to sole a problem thats has been bugging me for the last 2 hours, the internet is great…thank you!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Login

Lost your password?

Please enter your username or e-mail address. You will receive a new password via e-mail.

  • Facebook Become a Fan Like

  • Twitter Subscribe on Twitter Follow

  • YouTube Follow my Videos Subscribe

  • RSS Feed Subscribe with RSS Subscribe

Easy Digital Downloads

Most Loved

  • Love It Pro for WordPress
  • Write a “Love It” Plugin with Ajax to Let Users Love Their Favorite Posts / Pages
  • Simple Notices Pro Plugin for WordPress
  • User Bookmarks for WordPress
  • Front End Registration and Login Forms Plugin

Similar Plugins and Posts

  • Simple Google Maps Short Code
  • Github Contributors Short Code
  • Stripe Integration Part 3 – Variable Prices and Enhanced Plan Handling
  • User Submitted Image Gallery – Part 4
  • Image Gallery Short Code Using Post Attachments

Latest Premium Content

  • Plugin Development 101 – Introduction to Adding Dashboard Menus
  • Plugin Development 101 – Intro to Loading Scripts and Styles
  • User Follow System – Part 5
  • Plugin Development 101 – Intro to Short Codes

Latest Tutorials

  • Storing Session Data in WordPress without $_SESSION (19)

    The term Session in web development refers to...

  • Test Your Plugins with RTL (1)

    Right-To-Left languages are those that...

  • Submitting Your First Pull Request to a WordPress Plugin on Github (5)

    Github is an extremely popular tool for managing WordPress plugins, and one...

Enter your email to receive automated updates when new posts are published

WP Core Contributions

  • [24316]

View the ticket on Trac.

WP Codex Contributions

  • Function: shortcode exists
  • Function: has shortcode
  • Function: shortcode exists
  • Function: shortcode exists
  • Function: has shortcode

View all 41 changes in the Codex.

Latest Tweets

  • Could not fetch Twitter RSS feed.

Topics

contextual help register_setting meta box attachments Sugar Event Calendar the_content wp_enqueue_script hook add_shortcode campaign monitor featured Rémi Corson get_user_meta do_action login image authors mail chimp attachment forms short codes Related posts plugin recent posts comments post types apply_filters bbpress short code taxonomies custom post type gallery Ajax images Stripe jquery taxonomy widgets users add_filter easy content types add_action widget restrict content pro easy digital downloads

Weekly Newsletter

Useful Links

  • Join the Site
  • Plugin Store
  • Affiliate Area
  • Tag Index
  • Support the Site
  • Suggest a Tutorial
  • Random Post
  • Contact

Monthly Archives

(c) 2013 Pippin's Plugins