Global page ID variable empty error
After some research and thanks to @Milo for pointing out about using hooks after wp is set, I finnaly got it working. Indeed I had to call it as soon as wp has queried and generated some post/page data; This is my final solution, where I used add_action( ‘template_redirect’, ‘nb_setup_globals’ ); Here is the final … Read more