[wp-hackers] set wordpress privacy from functions.php

Andrew Gray andrew at graymerica.com
Mon Mar 7 18:05:36 UTC 2011

> There is an option under Settings -> Privacy, that blocks out search
> engines.

Just to be clear, I am trying to change that setting via code, not the admin interface.

I want my code to change the setting in the DB.

I can not find the option in the DB to change it directly, and have not been able to find an action to do it,



> On Mon, Mar 7, 2011 at 9:58 AM, Gaurav Aggarwal <gaurav91.2008 at gmail.com>wrote:
>> try restricting search bots by robots.txt
>> On Mon, Mar 7, 2011 at 11:22 PM, Andrew Gray <andrew at graymerica.com>
>> wrote:
>>> I would like to create a plugin that forces the site to not show up via
>> to search engines.  I want to force Site Visibility to be none.
>>> I want to change the option via a function and override what is in the
>> database.
>>> Does anyone know where that option is stored?
>>> My goal is to put this into my development switch to stop search engines
>> from finding out live sites.  We too often forget to update the database
>> after we move over production data,
>>> thanks,
>>> Andrew

More information about the wp-hackers mailing list