WP Manifestindependent plugin directory
manifest / content / related-posts

Helick Related Posts WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Simple related post plugin with ElasticPress integration

★ 1stars
139composer installs
v1.2.1latest · 7 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/helick/related-posts/archive/refs/heads/master.zip

On Packagist as helick/related-posts:

composer require helick/related-posts
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Latest Version on Packagist Total Downloads Software License Quality Score

The plugin provides a simple related posts functionality with the following features:

  • Ability to manually override related posts
  • ElasticPress integration

Requirements

Make sure all dependencies have been installed before moving on:

Install

Via Composer:

$ composer require helick/related-posts

Usage

The plugin exposes a single function that returns a list of post IDs.

$postIds = Helick\RelatedPosts\get(int $postId, array $args = []);

$postId is the ID of the post to get related content for.

$args allows you some control over the posts that are returned:

  • int limit: defaults to 10
  • array post_types: array of post types to limit results to, defaults to ['post']
  • array taxonomies: array of taxonomies to compare against, defaults to ['category']
  • array terms: array of WP_Term objects, results will match these terms
  • array terms_not_in: array of WP_Term objects, results will not match these terms
  • bool ep_integrate: if true then ElasticPress is used to get the results, defaults to defined('EP_VERSION')

Custom post type support

Control supported post types:

add_filter('helick_related_posts_supported_post_types', function (array $postTypes) {
    $postTypes[] = 'your-custom-post-type';

    return $postTypes;
});

Control associated post types:

add_filter('helick_related_posts_associated_post_types', function (array $postTypes) {
    $postTypes[] = 'your-custom-post-type';

    return $postTypes;
});

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email evgenii@helick.io instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Releases

4 releases.

Tag
Published
v1.2.1 latest
Aug 13, 2019 7 years ago
Jul 31, 2019 7 years ago
Jul 31, 2019 7 years ago
Jul 31, 2019 7 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Helick Related Posts v1.2.1 · audited by WP Registry

No security issues found.

Audited release
v1.2.1
Findings
none
Worst severity
—
Content hash
34bae6d9b54e4827ae5a3897…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.