• It appears to me, that it’s not possible to find a better and more dynamic solution for the following “hack” in <wordpress_dir>/index.php:

    define('WP_USE_THEMES', false);

    This configuration will be lost once an upgrade is performed – Isn’t there an option to do it with wp_options database table?

Viewing 8 replies - 1 through 8 (of 8 total)
  • A hack to do what though, what exactly are you doing? It’s hard to have any idea what you’re talking about when you provide no context to your question, please clarify what it is speficically you’re talking about.

    There’s no reason i can think of you’d ever need to edit that line in the index.php file(it can be defined elsewhere, it’s a constant after all), so please explain why you think you need to.

    Thread Starter mazooo

    (@mazooo)

    Sorry for the (too) short explanation. Imagine, you would use wordpress only as a content management system (for whatever reason). Say, you use the URL example.com/wp-admin/. In order to make sure, that there is nothing rendered at example.com/, I used the option

    define('WP_USE_THEMES', false);

    This works perfectly fine. It’s just not the perfect solution, because I need to be careful after every wordpress upgrade.

    Say, you use the URL example.com/wp-admin/. In order to make sure, that there is nothing rendered at example.com

    Sorry i’m not following you, what appears at example.com then? Nothing? You only use the admin side?

    I used the option

    define(‘WP_USE_THEMES’, false);

    Used it where, in a core WordPress file, in an external file, in a theme/plugin file?

    Place it in wp-config.php that file isn’t updated by a new update

    Ok, but what makes you think defining a constant in the config file is wrong, that’s the perfect place to have it if you need to disable themes.

    Else, you’ll need to explain yourself a little more… Please.. ??

    Thread Starter mazooo

    (@mazooo)

    @jaapmarcus:
    Good idea but not the solution, since /index.php would redefine to true in an out-of-the-box installation. And we do not want to change code which will be lost at the next update.

    @mark:
    Yes, I already mentioned earlier, I use only the admin site. Do you really need to know why I need only the admin site? ??
    Using define(‘WP_USE_THEMES’, false) in /index.php works fine, I will have to set it to false in every Update though.

    Do you really need to know why I need only the admin site

    Well technically no…. but sometimes someone asks for something, and we don’t quite use the same terminology/thought process

    So if we are able to visualize the end result/use we can help get to the desired outcome….

    Thread Starter mazooo

    (@mazooo)

    So, I am using the admin site as a backend for an iApp. The iApp does requests on an extract script, which gets some data from the fantastic wp data model and returns it to the iApp in JSON.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘More dynamic solution for WP_USE_THEMES false’ is closed to new replies.