Forums

variables in wp-config.php (4 posts)

  1. RenegadeLatino
    Member
    Posted 5 years ago #

    I would like to know if it is possible to use variables in wp-config.php.

    I am trying to use $user_level in an if statement in the wp-config.php file. I have made the if statement using $user_ID and $user_ID comes back false even though I am logged in. I am thinking maybe I need to declare something gloabl or require_once something. Any suggestions?

  2. moshu
    Member
    Posted 5 years ago #

    Why do you want to modify the wp-config file?

    It would be better if you describe what exactly do you want to achieve, what is your end-goal... and then somebody will direct you in the right direction.

  3. RenegadeLatino
    Member
    Posted 5 years ago #

    I am making an if statement so that if $user_level > 9, the admin panel is set to English and else it is set to Español.

    I am running a bilingual blog. I would like my admin panel in English but all other users want it in Español. Currently I am testing the Gengo and Polyglot plugins, and others if necessary, to see which plugin works best for what I need. But in the mean time a simple if statement in wp-config.php is what I am looking for.

  4. moshu
    Member
    Posted 5 years ago #

    Gengo is the way to go: I posted this article yesterday :)

    Sorry, I am not a coder, but never heard about conditionals in wp-config...

Topic Closed

This topic has been closed to new replies.

About this Topic