{"action":"created","issue":{"url":"https://api.github.com/repos/torounit/custom-post-type-permalinks/issues/62","repository_url":"https://api.github.com/repos/torounit/custom-post-type-permalinks","labels_url":"https://api.github.com/repos/torounit/custom-post-type-permalinks/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/torounit/custom-post-type-permalinks/issues/62/comments","events_url":"https://api.github.com/repos/torounit/custom-post-type-permalinks/issues/62/events","html_url":"https://github.com/torounit/custom-post-type-permalinks/issues/62","id":176728993,"number":62,"title":"404 on single post page","user":{"login":"sijones-uk","id":13103339,"avatar_url":"https://avatars.githubusercontent.com/u/13103339?v=3","gravatar_id":"","url":"https://api.github.com/users/sijones-uk","html_url":"https://github.com/sijones-uk","followers_url":"https://api.github.com/users/sijones-uk/followers","following_url":"https://api.github.com/users/sijones-uk/following{/other_user}","gists_url":"https://api.github.com/users/sijones-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/sijones-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sijones-uk/subscriptions","organizations_url":"https://api.github.com/users/sijones-uk/orgs","repos_url":"https://api.github.com/users/sijones-uk/repos","events_url":"https://api.github.com/users/sijones-uk/events{/privacy}","received_events_url":"https://api.github.com/users/sijones-uk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-13T19:30:33Z","updated_at":"2017-02-06T15:48:16Z","closed_at":null,"body":"Since version 2.1.0 I'm getting 404s on all of my single post pages for custom post types. My custom post type (wpbb_job) is defined inside another plugin (WP Broadbean) and has a rewrite slug of 'jobs'. Before v2.1.0 I was able to define the permalink as:\n\n`http://<domain>/jobs/%wpbb_job_industry%/%postname%/`\n\nwhere `wpbb_job_industry` is the taxonomy. This would be transformed into something like this:\n\n`http://<domain>/jobs/marketing/digital-marketing/project-manager/`\n\nSince v2.1.0 the permalinks are being converted correctly, but clicking on them results in a 404. Previously the correct post would be displayed.\n\nI've narrowed the problem down to `Rewrite.php`, in particular where you tidied up the code in the `add_hook()` function and removed the `add_action( 'wp_loaded', array( $this, 'add_rewrite_rules' ), 10 );` after v2.0.2. I can't work out why this is causing the 404 though.\n"},"comment":{"url":"https://api.github.com/repos/torounit/custom-post-type-permalinks/issues/comments/277722470","html_url":"https://github.com/torounit/custom-post-type-permalinks/issues/62#issuecomment-277722470","issue_url":"https://api.github.com/repos/torounit/custom-post-type-permalinks/issues/62","id":277722470,"user":{"login":"wildfang","id":25499930,"avatar_url":"https://avatars.githubusercontent.com/u/25499930?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfang","html_url":"https://github.com/wildfang","followers_url":"https://api.github.com/users/wildfang/followers","following_url":"https://api.github.com/users/wildfang/following{/other_user}","gists_url":"https://api.github.com/users/wildfang/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfang/subscriptions","organizations_url":"https://api.github.com/users/wildfang/orgs","repos_url":"https://api.github.com/users/wildfang/repos","events_url":"https://api.github.com/users/wildfang/events{/privacy}","received_events_url":"https://api.github.com/users/wildfang/received_events","type":"User","site_admin":false},"created_at":"2017-02-06T15:48:16Z","updated_at":"2017-02-06T15:48:16Z","body":"This seems to be still open with 3.0.0?\r\nHow can I fix it? My CPT Single is suddenly a 404..."}}
{"actor":{"display_login":"wildfang"}}