replacing post ID by custom post name in url

Under Settings>Permalinks you merely have to select “Post Name” to get the post name in the permalink. If you are getting parse/syntax errors something else is going on and I suggest you revert to the default theme and disable plugins until you determine where the problem is coming from.

Change permalinks