As I’m learning to make wordpress templates I have a question:
I want to optimize the security of a template and WordPress tells me to add this line:
defined('ABSPATH') or die("No script kiddies please!");
Do I have to do that for each .php file of the theme?
Many thanks!
You don’t have to add it to anything. Adding this kind of thing in a WordPress template is usually pointless. That’s not to say that direct access may not be dangerous…but directly accessing a WordPress theme template or plugin usually won’t do anything, as they need to run through WordPress.
To answer your question: You can add it to each theme file that you don’t want to be directly accessible.