{"id":33289540,"url":"https://github.com/badasswp/redirect-duplicate-posts","last_synced_at":"2026-01-04T17:13:02.895Z","repository":{"id":323628062,"uuid":"1094040746","full_name":"badasswp/redirect-duplicate-posts","owner":"badasswp","description":"Redirect duplicate post URLs to original URL.","archived":false,"fork":false,"pushed_at":"2025-11-11T08:03:29.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-11T09:11:50.711Z","etag":null,"topics":["duplicate","plugin","posts","seo","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badasswp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T07:08:41.000Z","updated_at":"2025-11-11T08:03:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/badasswp/redirect-duplicate-posts","commit_stats":null,"previous_names":["badasswp/redirect-duplicate-posts"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/badasswp/redirect-duplicate-posts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fredirect-duplicate-posts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fredirect-duplicate-posts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fredirect-duplicate-posts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fredirect-duplicate-posts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badasswp","download_url":"https://codeload.github.com/badasswp/redirect-duplicate-posts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fredirect-duplicate-posts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284964327,"owners_count":27091965,"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","status":"online","status_checked_at":"2025-11-17T02:00:06.431Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["duplicate","plugin","posts","seo","wordpress"],"created_at":"2025-11-17T22:03:50.493Z","updated_at":"2026-01-04T17:13:02.888Z","avatar_url":"https://github.com/badasswp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redirect-duplicate-posts\nRedirect Duplicate Posts\n\nFor e.g. `https://example.com/hello-world-2` -\u003e `https://example.com/hello-world`\n\n## Download\n\nDownload from [WordPress plugin repository](https://wordpress.org/plugins/redirect-duplicate-posts/).\n\nYou can also get the latest version from any of our [release tags](https://github.com/badasswp/redirect-duplicate-posts/releases).\n\n## Why Redirect Duplicate Posts?\n\nWorking with translation plugins can be sometimes stressful, especially if your post or article is erroneously translated into multiple copies which you never intended.\n\nThis plugin helps redirect users away from duplicate posts and articles to the original post URL, thereby improving Search Engine Optimization for your WP website.\n\n### Hooks\n\n#### `redirect_duplicate_posts_exclude_urls`\n\nThis custom hook (filter) provides the ability to exclude a specific URL from redirection:\n\n```php\nadd_filter( 'redirect_duplicate_posts_exclude_urls', [ $this, 'filter_exclude_urls' ], 10, 1 );\n\npublic function filter_exclude_urls( $urls ): array {\n    $urls[] = 'https://exmaple.com/hello-world-2';\n\n    return $urls;\n}\n```\n\n**Parameters**\n\n- urls _`{string[]}`_ List of URLs to exclude.\n\u003cbr/\u003e\n\n#### `redirect_duplicate_posts_redirect_url`\n\nThis custom hook (filter) provides the ability to filter the redirect URL. For e.g you can do:\n\n```php\nadd_filter( 'redirect_duplicate_posts_redirect_url', [ $this, 'filter_redirect_url' ], 10, 3 );\n\npublic function filter_redirect_url( $redirect_url, $current_url, pattern ): string {\n    if ( 'https://example.com/hello-world-2' === $redirect_url ) {\n        error_log( 'Error: Redirect URL not working as expected' );\n    }\n}\n```\n\n**Parameters**\n\n- redirect_url _`{string}`_ Redirect URL. By default, this would be the Redirect URL.\n- current_url _`{string}`_ Current URL. By default, this would be the Current URL of the duplicate post.\n- pattern _`{string}`_ Regex Pattern. By default, this would be a regex pattern to help with matching duplicate posts.\n\u003cbr/\u003e\n\n#### `redirect_duplicate_posts_regex_pattern`\n\nThis custom hook (filter) provides the ability to filter the regex pattern. For e.g you can do:\n\n```php\nadd_filter( 'redirect_duplicate_posts_regex_pattern', [ $this, 'filter_regex_pattern' ], 10, 1 );\n\npublic function filter_regex_pattern( $pattern ): string {\n    return '/-(?:[2-9])\\/?$/';\n}\n```\n\n**Parameters**\n\n- pattern _`{string}`_ Regex Pattern. By default this would be a regex pattern to help with matching duplicate posts.\n\u003cbr/\u003e\n\n---\n\n## Contribute\n\nContributions are __welcome__ and will be fully __credited__. To contribute, please fork this repo and raise a PR (Pull Request) against the `master` branch.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadasswp%2Fredirect-duplicate-posts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadasswp%2Fredirect-duplicate-posts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadasswp%2Fredirect-duplicate-posts/lists"}