setting()
Description
Will return an array or single value of the specified setting.
Usage
<?php
$setting= setting( $setting_name, $column );
?>
Parameters
$setting_name
- required
The name of the setting you would like to retreive.
$column
- optional
- integer, 1-3
A single setting can have up to three parts to it. Supplying a column number will return that single value, leaving it blank will return the entire setting as an array.
Examples
The Site Setting (site URL + title)
<?php
$site= setting( "site" );
echo $site[0]; // site title
echo $site[1]; // site URL
echo $site[2]; // blank
?>
Getting only the site title
<?php
$title= setting( "site", 1 ); // Notice that $column is a different offset than array default
echo $title;
?>
-
FAQ
- What is the Page Type and how do I use it?
- How do I make blog pagination work?
- How can I make next/previous buttons to navigate my projects?
- How do I include Vimeo, YouTube, SoundCloud etc in my projects, pages, blog posts?
- How do I make excerpts for my blog posts? (Using the {more} tag)
- View all (2 more)
-
General Documentation
-
Themes
-
Code Documentation