WordPressget_option()


Introduction

Retrieves an option value based on an option name.

Syntax

  • get_option( $option, $default )

Parameters

ParameterDetails
$option(string) Name of option to retrieve. Expected to not be SQL-escaped.
$default(mixed) (Optional) Default value to return if the option does not exist.

Remarks

List of arguments for $option

  • 'admin_email'
  • 'blogname'
  • 'blogdescription'
  • 'blog_charset'
  • 'date_format'
  • 'default_category'
  • 'home'
  • 'siteurl'
  • 'template'
  • 'start_of_week'
  • 'upload_path'
  • 'users_can_register'
  • 'posts_per_page'
  • 'posts_per_rss'