WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/set theme mod

Contents

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
(string) (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.