Modified the function used to remove the blog folder name from the blog path