Skip to content

lloc/Multisite-Taxonomy-Widget

Repository files navigation

Multisite Taxonomy Widget

Display a recent posts-widget of all your posts in your blog-network which have a specific tag, category or any other built-in or custom taxonomy.

codecov

This plugin enhances WordPress multisites by displaying related posts across the network. It offers a widget, shortcode, and filters for flexible content surfacing.

Please keep in mind that the version of the Multisite Taxonomy Widget on GitHub is a work in progress.

Download the latest stable version from the WordPress Plugin Directory.

Need help? Check out the forum first! If you find any bugs then I would very much like to hear about the issue.

Features

  • Query posts across your multisite network by taxonomy (core or custom) with an adjustable limit.
  • Expose the content via a widget or shortcode, each supporting thumbnails and custom markup.
  • Extend behaviour through WordPress-style filters without touching core plugin code.

Installation

  1. Download the zip from the WordPress directory or clone this repository.
  2. Install it into your wp-content/plugins/ directory and activate it network-wide.
  3. Configure the widget or shortcode as described below.

Usage

Widget

After activation you will find Multisite Taxonomy in Appearance ▸ Widgets (/wp-admin/widgets.php).

  • Drag the widget into any sidebar.
  • Configure the available fields:
    • Title — optional heading for the widget output.
    • Taxonomy — taxonomy slug (e.g. category, post_tag, product_category).
  • Term Slug — the term slug to query against (cool-post when the term name is Cool post).
    • Limit — maximum number of posts; set to -1 to show all (not recommended for large sites).
    • Thumbnail — positive pixel width to include thumbnails, or 0/empty to hide them.

Shortcode

Use the [mtw_posts] shortcode anywhere shortcodes are supported. Parameters mirror the widget settings.

[mtw_posts taxonomy="category" name="test"]

[mtw_posts taxonomy="post_tag" name="featured" thumbnail="0"]

[mtw_posts taxonomy="product_category" name="test" limit="5"]

Filters and Extensibility

Hook Description Purpose
mtw_formatelements_output_filter Override the list wrappers (<ul>, <li>).
mtw_thumbnail_output_filter Customize thumbnail markup with access to the post object and args.
mtw_shortcode_output_filter Adjust the shortcode list item output.
mtw_widget_output_filter Adjust the widget list item output.

Development

composer install        # install dependencies
composer test           # run the PHPUnit suite with Brain Monkey
composer phpstan        # static analysis using WordPress extensions
composer coverage       # generate HTML coverage at tests/coverage/

Feel free to open pull requests; see AGENTS.md for the full contributor guide.

Support

Visit the support forum to share questions or ideas. Bug reports are always welcome through GitHub issues.

Additional usage documentation and API references are available on the project site.

About

List the latest posts of a specific taxonomy in the whole blog-network

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •