js to be used with the custom post type