I'm in the single.php
and now need to use the_content()
instead of just $post->post_content
; for youtube embeds etc.–
in other projects the_content()
and apply_filters("the_content", ...)
does what it should do, but not in this single.php
... Twentyseventeen theme with the same plugins works great with the_content()
; so it must be my theme.
After hours of researching and fiddling around I found out that I did this pretty early in the code:
$GLOBALS = array(
"active_menu" => "...",
"something_else" => true
);
// don't ask me why I did this, I was a even more a noob back then;
// it's been working fine so far; no time to refactor.. u know the excuses–
// of course I just do it like this now:
$GLOBALS["active_menu"] = "...";
$GLOBALS["something_else"] = true;
When I wanted to see what might be so crucial in the "original" $GLOBALS
, the browser loaded like it went to Oblivion and back again. So much stuff inside this var.
So here's the question
- Why did an overwritten
$GLOBALS
which is sooo big, kill the filter?