Timeline for How do I pass a post ID to the page URL?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 13, 2012 at 22:03 | review | First posts | |||
Sep 28, 2012 at 17:22 | |||||
Sep 8, 2012 at 17:21 | comment | added | Redwall |
Sorry I thought u only changed the custom post type name from your first code. When I compared now I see u also changed the line 'author' => $user_ID thanks for your help, excellent work / advice!
|
|
Sep 8, 2012 at 17:20 | vote | accept | Redwall | ||
Sep 8, 2012 at 17:03 | comment | added | Redwall | Hi Carl, thanks I just figured that out after posting my message :) One thing though that is not really working still. The result seems to always get the first post in the custom posts rather than the first post for that Author...So regardless of the Author logged in, I always get returned the same POST ID in my case 476...Any ideas? | |
Sep 8, 2012 at 16:59 | history | edited | Carl Rannaberg | CC BY-SA 3.0 |
Changed post type to 'farmers' according to question author comment
|
Sep 8, 2012 at 16:56 | vote | accept | Redwall | ||
Sep 8, 2012 at 17:11 | |||||
Sep 8, 2012 at 16:52 | comment | added | Carl Rannaberg | @Redwall, I edited the code according to your post type comment. When getting the new WP_Query object there is a setting for post type. I changed that to 'farmers'. | |
Sep 8, 2012 at 16:51 | history | edited | Carl Rannaberg | CC BY-SA 3.0 |
Changed post type to 'farmers' according to question author comment
|
Sep 8, 2012 at 16:45 | comment | added | Redwall | Hi Carl, thanks for the input and great answer...However I cannot get it to work. For some reason I am getting a POST ID returned which this Author is not even an Author of. I know because I just added a test author and manually assigned them 1 post. Does the fact it is a CUSTOM POST TYPE make any difference to your code? Post Type name is Farmers? thanks again, nearly there... | |
Sep 8, 2012 at 16:38 | history | edited | Carl Rannaberg | CC BY-SA 3.0 |
Added the echoing URL line
|
Sep 8, 2012 at 16:33 | history | answered | Carl Rannaberg | CC BY-SA 3.0 |