[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-css v2.1.0 Update to oik-css v2.1.0 for the ability to style CSS and GeSHi output in documentation. ...
oik-types v2.3.0 Update to oik-types v2.3.0 for improved control over sort order on archives ...
UK-tides v3.1.0 UK-tides v3.1.0 now supports several additional ports. It's built with latest wp-scripts and shared libraries and tested with WordPress 6.1. ...
oik v4.8.2 Upgrade to oik v4.8.2 if you installed oik v4.8.1 from wordpress.org and found that the blocks were missing from the editor. ...
sb-chart-block v1.1.0 sb-chart-block v1.1.0 now uses chart.js v3.9.1. Tested with WordPress 6.0.1 and Gutenberg 13.8.2 ...

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: oikplug@oik-plugins.com

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-2023. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.1.1. PHP: 7.4.33. Memory limit: 768M