I've set up my custom post types (like portfolio items, books etc), but I'm getting a page not found (404) error when I visit the pages, why?

Ok, this is a bit of a WordPress quirk, sometimes it gets its permalinks confused with custom post types. Just go to Settings > Permalinks and hit "Save Changes" and your portfolio items will magically start working again :)