Insert a series of images and descriptions using the portfolio shortcode.
[hr]
[portfolio post_type=”page” post_parent=”1002″ content_width=”649″ image_ratio=”3:2″ columns=”4″ paging=false posts_per_page=”4″ orderby=”rand” order=”ASC”]
[code][portfolio category=”7,8,9″ columns=”4″ content_width=”926″ image_ratio=”4:3″][/code]
[clear]
[clear]
Portfolio items from categories with paging and excerpt:
[portfolio category="7,8,9" excerpt="yes" paging="true"]
[hr]
Portfolio items may also be generated from pages using a list of page ID’s or the child pages from a parent page ID.
[clear]
[clear]
[portfolio post_type="page" page_id="10,11,12"]
[portfolio post_type="page" post_parent="9"]
[hr]
[clear]
[clear]
Display random posts:
[portfolio category="8" orderby="rand"]
Display popular posts:
[portfolio category="8" orderby="comment_count"]
[hr]
For advanced usage, you can add most parameters accepted by WP_Query . The shortcode can use any of these parameters which are string or an integer values. Arrays are not supported.
Example use of WP_Query s
parameter used to return a query filtered by a search term.
[clear]
Display posts based on search results:
[portfolio category="8" s="Lorem Ipsum"]
[clear]
Display all posts except those from a category by prefixing its id with a ‘-‘ (minus) sign:
[portfolio cat="-8"]
[clear]
[message_box type=”info” icon=”yes”]When you create video portfolio items you can specify the video size in the URL. For example, if adding the video: http://www.youtube.com/watch?v=B7UmUX68KtE&hd=1 you could specify the width and height by entering http://www.youtube.com/watch?v=B7UmUX68KtE&hd=1&width=1280&height=720 [/message_box]