[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog
You are here: Home / Examples / Example: [nivo] using the id= parameter to select multiple posts in a defined sequence

Example: [nivo] using the id= parameter to select multiple posts in a defined sequence

On the WordPress.org support forum someone asked to be able to specifically choose the images to display in the nivo slider and control the sequence in which they are displayed, without having to upload the images multiple times. e.g. on one page use [nivo id=1,2,3,4], on another use [nivo id=2,1,4,3] and on a third use [nivo id=4,2,1,3] With oik v2.1 it is now possible to use the id= parameter to select the specific attachment images to display. By default the sort sequence will be in the order you specify the ids.
Here we see 3 images of Ditto in sequence: 8260, 8261, 8262 [nivo id=8260,8261,8262 theme=dark]
Ditto on the tableIs it tea time yetIt’s a hard life
Here we see the same 3 images in reverse order: 8262, 8261, 8260 [nivo post__in=”8262 8261 8260″ theme=light]
It’s a hard lifeIs it tea time yetDitto on the table
Note: id= and post__in= are interchangeable.

See also

[nivo] oik-nivo-slider WordPress support topic: oik-nivo-slider: Order based in include parameter Nivo slider with defined slide order Examples

Technically

The new logic for oik v2.1. is implemented in

You appear to be a bot. Output may be restricted

Sourcefile not defined for 9021bw_api cannot determine the funcname. The solution to this problem was to use the “post__in” parameter to get_posts(), also using the orderby=post__in sort sequence by default when selecting multiple ids.

hover to slideToggle source

On the [lwp] support forum someone asked to be able to specifically choose the images to display in the nivo slider and control the sequence in which they are displayed, without having to upload the images multiple times. e.g. on one page use [[nivo id=1,2,3,4]], on another use [[nivo id=2,1,4,3]] and on a third use [[nivo id=4,2,1,3]]With oik v2.1 it is now possible to use the <code>id=</code> parameter to select the specific attachment images to display. By default the sort sequence will be in the order you specify the ids.[div class=w50p5]Here we see 3 images of Ditto in sequence: 8260, 8261, 8262[[nivo id=8260,8261,8262 theme=dark]][nivo id=8260,8261,8262 theme=dark][ediv][div class=w50pc]Here we see the same 3 images in reverse order: 8262, 8261, 8260[[nivo post__in="8262 8261 8260" theme=light]][nivo post__in="8262 8261 8260" theme=light][ediv]Note: <code>id=</code> and <code>post__in=</code> are interchangeable. <h3>See also</h3>[bw_code nivo][bw_plug name=oik-nivo-slider]<a href="http://wordpress.org/support/topic/order-based-on-include-parameter?replies=5" title="WordPress support topic: oik-nivo-slider: Order based on include parameter" target="_blank">WordPress support topic: oik-nivo-slider: Order based in include parameter</a>[bw_link 2102][bw_parent]<h3>Technically</h3>The new logic for oik v2.1. is implemented in [bw_api bw_get_posts]. The solution to this problem was to use the "post__in" parameter to get_posts(), also using the orderby=post__in sort sequence by default when selecting multiple ids. [clear]<hr />[bw_wtf]

Published: July 2, 2013 | Last updated: July 2, 2013

Information

Component:
Letters: E

Recent plugin updates

oik v4.7.2 oik v4.7.2 includes a fix to the logic to render blocks for Content and Excerpts in the bw_pages shortcode. ...
oik v4.7.1 Upgrade to oik v4.7.1 for bw_pages rendering blocks for Content and Excerpts, and support for post_name attribute for shortcode which query posts ...
oik-shortcodes v1.41.1 Upgrade to oik-shortcodes v1.41.1 for a couple of minor changes. ...
oik-bob-bing-wide v2.2.2 Upgrade to oik-bob-bing-wide v2.2.2 for improvements to bw_dash examples and fixes to some SVG icon's visibility. ...
oik-bwtrace v3.3.1 Upgrade to oik-bwtrace v3.3.1 to measure plugin load times and ad hoc action timing points. ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: [email protected]

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2022. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins