Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // OptionTree Text Option Type
- // Example code when being used as a Metabox or
- // Exported OptionTree file to be used in Theme Mode
- array(
- 'id' => 'spyr_demo_text',
- 'label' => __( 'Text', 'text-domain' ),
- 'desc' => __( 'Your description', 'text-domain' ),
- 'type' => 'text',
- 'section' => 'your_section',
- )
- // Get the value saved on Theme Options Page
- $spyr_demo_text = ot_get_option( 'spyr_demo_text' );
- // Get the value saved for a Page, Post or CPT ( Within the loop )
- $spyr_demo_text = get_post_meta( $post->ID, 'spyr_demo_text', true );
- // Wrap the value in a P tag and echo it
- echo wpautop( $spyr_demo_text );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement