WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/set theme mod

Description

Creates or updates a modification setting for the current theme. Along with get_theme_mod() this function sometimes offers theme developers a simpler alternative to the Settings API when there is a need to handle basic theme-specific settings.

Usage

<?php set_theme_mod$name$value ); ?>

Parameters

$name
(string) (required) Theme modification name.
Default: None
$value
(mixed) (required) Theme modification value.
Default: None

Return Values

(void) 
This function does not return a value.

Examples

Notes

Change Log

Since: 2.1.0

Source File

set_theme_mod() is located in wp-includes/theme.php

Related

set_theme_mod(), get_theme_mod(), get_theme_mods(), remove_theme_mod(), remove_theme_mods()

See also index of Function Reference and index of Template Tags.