Created
July 30, 2014 12:49
-
-
Save yojance/f47a2425723013113e4a to your computer and use it in GitHub Desktop.
OptionTree Numeric Slider Option Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OptionTree Numeric Slider Option Type | |
// Example code when being used as a Metabox or | |
// Exported OptionTree file to be used in Theme Mode | |
array( | |
'id' => 'spyr_demo_numeric_slider', | |
'label' => __( 'Numeric Slider', 'text-domain' ), | |
'desc' => __( 'Your description', 'text-domain' ), | |
'type' => 'numeric-slider', | |
'section' => 'your_section', | |
'min_max_step'=> '-500,5000,100', | |
) | |
// Get the value saved on Theme Options Page | |
$spyr_demo_numeric_slider = ot_get_option( 'spyr_demo_numeric_slider' ); | |
// Get the value saved for a Page, Post or CPT ( Within the loop ) | |
$spyr_demo_numeric_slider = get_post_meta( $post->ID, 'spyr_demo_numeric_slider', true ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment