How to create custom variables in the wp-config

Why do you need this?

In wp-config you can set defines. They will be accesible everywhere without needing to use globals. Define something: define('MY_DEFINE_NAME', 'THE_VALUE');.

Then in your templates you can show the value like this: echo MY_DEFINE_NAME;

Or set the value to a variable: $var = MY_DEFINE_NAME;.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)