About

The database of a WP install contains an option table that is used for settings both of WP core itself and of plugins/themes. The `get-option()` function retrieves a row from this table

The database of a WP install contains an option table that is used for settings both of WP core itself and of plugins/themes. The get-option() function retrieves a row from this table. The function returns a value, that may be a string, a number, an array or something else.

If the function returns false, this may mean either the option was never defined (you made a typing error in the name) or the options is defined somewhere in the theme/plugin, but has not been entered into the database yet. To prevent get_option returning false, it is possible to pass a default with the function.

history | excerpt history