Custom post type permalinks all load the homepage
-
I’m trying to create permalinks for a custom post type, “property” based on a custom field value, “the_property_id”.
This custom field value corresponds to the post count, so the first published post has a “the_property_id” of 1, and the 160th post has a “the_property_id” value 160.
The following code successfully creates the permalinks, but when you actually click the property link to a single page, it loads the homepage rather than the indicated single page.
I’ve refreshed the permalinks whenever I save this function, and have tried every troubleshooting suggested by several google searches…
What am I doing wrong here? Thanks!
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
- The topic ‘Custom post type permalinks all load the homepage’ is closed to new replies.