[wp-trac] [WordPress Trac] #33035: Shortcode to pull the posts by post_type
WordPress Trac
noreply at wordpress.org
Sat Jul 18 17:36:41 UTC 2015
#33035: Shortcode to pull the posts by post_type
-----------------------------+-----------------------------
Reporter: achaljain | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 4.2.2
Severity: normal | Keywords:
Focuses: template |
-----------------------------+-----------------------------
There should be a shortcode to pull the posts or custom posts by it's
type. So, instead of writing a custom code using WP_Query in
functions.php, we should have a shortcode that would be utilized as
follow:
[post type="services" number_of_post=10 order="ASC" orderby="menu_order"
caller_get_posts=1]
So, all of the query arguments can be utilized inside this shortcode. It
will help a lot to display posts anywhere on the page. We don't need to
write a big conditional code even.
Of-course, there should be some plugins for this, but it would be better
to have an internal WordPress functionality.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33035>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list