[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
  • #
  • &
  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • [

Using bw_related to find posts in a category related to a CPT fieldref value

In this post we demonstrate an example of the bw_related shortcode to find posts related to a particular field value through a matching category value.

[bw_related post_type=post category_name=_plugin_ref._oikp_slug exclude=-1]
 
List posts which are in the category determined by the value of the field _oikp_slug associated to the post referenced by the current value of the _plugin_ref field for this post. i.e. List posts categorised in “oik-fields”, including this one.
  • [bw_table] currently dependent upon oik-fields plugin
  • Documentation for the oik-fields plugin
  • New versions of oik, oik-fields and oik-css plugins
  • oik v2.1 now available
  • oik version 2.0-alpha, API and shortcode documentation
  • Problems with meta_compare=”>=” shortcode parameter in WordPress 4.0
  • Requirements for Post Meta plugins
  • Using bw_related to find posts in a category related to a CPT fieldref value

Notes

  • This is a rather convoluted example.
  • It was created primarily to demonstrate the power and complexity of the bw_related shortcode
  • It uses the concept of field references ( fieldref ) where the field value used is from a field associated with a referenced post.
  • The bw_related shortcode determines that the value for the category_name= parameter can’t be an actual category_name slug so it looks up the value to use.
  • In this case, since there is a string before the period (.), it recognises this as a fieldref.

See also

  • [bw_related]
  • oik-fields

Component:
  • oik-fields – custom post type field APIs

Published: March 1, 2014 | Last updated: December 4, 2020

Filed Under: oik-fields Tagged With: bw_related

Information

Component:
  • oik-fields – custom post type field APIs

Recent plugin updates

oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

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


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

WordPress version: 6.8.3

Gutenberg version: 21.7.0

PHP version: 8.2.29