{"id":20711816,"url":"https://github.com/helick/related-posts","last_synced_at":"2026-05-08T03:15:12.376Z","repository":{"id":52418618,"uuid":"190615469","full_name":"helick/related-posts","owner":"helick","description":"Simple related post plugin with ElasticPress integration","archived":false,"fork":false,"pushed_at":"2021-04-29T19:51:03.000Z","size":22,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T21:21:57.893Z","etag":null,"topics":["composer","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-06T16:36:38.000Z","updated_at":"2023-09-06T15:21:24.000Z","dependencies_parsed_at":"2022-08-17T23:55:34.363Z","dependency_job_id":null,"html_url":"https://github.com/helick/related-posts","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helick%2Frelated-posts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helick%2Frelated-posts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helick%2Frelated-posts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helick%2Frelated-posts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helick","download_url":"https://codeload.github.com/helick/related-posts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242982741,"owners_count":20216662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","wordpress","wordpress-plugin"],"created_at":"2024-11-17T02:17:02.583Z","updated_at":"2025-12-26T03:14:28.115Z","avatar_url":"https://github.com/helick.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helick Related Posts\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Total Downloads][ico-downloads]][link-downloads]\n[![Software License][ico-license]](LICENSE.md)\n[![Quality Score][ico-code-quality]][link-code-quality]\n\nThe plugin provides a simple related posts functionality with the following features:\n- Ability to manually override related posts\n- [ElasticPress][link-elasticpress] integration\n\n## Requirements\n\nMake sure all dependencies have been installed before moving on:\n\n* [PHP](http://php.net/manual/en/install.php) \u003e= 7.1\n* [Composer](https://getcomposer.org/download/)\n\n## Install\n\nVia Composer:\n\n``` bash\n$ composer require helick/related-posts\n```\n\n## Usage\n\nThe plugin exposes a single function that returns a list of post IDs.\n\n``` php\n$postIds = Helick\\RelatedPosts\\get(int $postId, array $args = []);\n```\n\n**$postId** is the ID of the post to get related content for.\n\n**$args** allows you some control over the posts that are returned:\n\n- int **limit**: defaults to `10`\n- array **post_types**: array of post types to limit results to, defaults to `['post']`\n- array **taxonomies**: array of taxonomies to compare against, defaults to `['category']`\n- array **terms**: array of `WP_Term` objects, results will match these terms\n- array **terms_not_in**: array of `WP_Term` objects, results will not match these terms\n- bool **ep_integrate**: if true then ElasticPress is used to get the results, defaults to `defined('EP_VERSION')`\n\n### Custom post type support\n\nControl supported post types:\n\n``` php\nadd_filter('helick_related_posts_supported_post_types', function (array $postTypes) {\n    $postTypes[] = 'your-custom-post-type';\n\n    return $postTypes;\n});\n```\n\nControl associated post types:\n\n``` php\nadd_filter('helick_related_posts_associated_post_types', function (array $postTypes) {\n    $postTypes[] = 'your-custom-post-type';\n\n    return $postTypes;\n});\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email evgenii@helick.io instead of using the issue tracker.\n\n## Credits\n\n- [Evgenii Nasyrov][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/helick/related-posts.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/helick/related-posts.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/helick/related-posts.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/helick/related-posts\n[link-code-quality]: https://scrutinizer-ci.com/g/helick/related-posts\n[link-downloads]: https://packagist.org/packages/helick/related-posts\n[link-elasticpress]: https://github.com/10up/ElasticPress\n[link-author]: https://github.com/nasyrov\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelick%2Frelated-posts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelick%2Frelated-posts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelick%2Frelated-posts/lists"}