…Getting Saved Values From the Neat Options PanelI have discussed this process of getting the saved option values previously in detail. Make sure you read the series. Hence, I am directly writing the lines of code which will retrieve the values. You can add these lines in any file of…
…Getting started: http://www.titanframework.net/get-started/ * Metabox: http://www.titanframework.net/meta-box/ * Options: http://www.titanframework.net/docs/ * Getting Option Values: http://www.titanframework.net/getting-option-values/ */ add_action( 'tf_create_options', 'aa_metabox_options' ); function aa_metabox_options() { // Initialize Titan with your theme name. $titan = TitanFramework::getInstance( 'neat' ); /** * First metabox. */ $aa_metbox = $titan->createMetaBox( array( 'name' => 'Metabox Options', // Name the…
…Getting started : http://www.titanframework.net/get-started/ * Customizer : http://www.titanframework.net/theme-customizer-section/ * Options : http://www.titanframework.net/docs/ * Getting Option Values: http://www.titanframework.net/getting-option-values/ * Live preview : http://www.titanframework.net/livepreview-parameter/ */ add_action( 'tf_create_options', 'aa_customizer_options' ); function aa_customizer_options() { // Initialize Titan with your theme name $titan = TitanFramework::getInstance( 'neat' ); /** First section */ $aa_section1 = $titan->createThemeCustomizerSection( array(…
…Getting option value * */ $aa_txt_val = $titan->getOption( 'aa_txt' ); /** * * Print the option value * */ echo $aa_txt_val; // Print the value saved in aa_txt option I used the ID of the text option as a parameter inside the getOption() function and saved the value in a…
…Getting Values. * * Notice the use of get_the_ID(). It is because metabox is created for all * the post types we defined. TO get the value of a metabox option for a specific page/post * we need to give getOptions() function the ID of our post/page. Which is done…
…getting values is exactly the same. Only the IDs and variables have new values, and we provide the getOption() function with two parameters, one being the ID of the option and the other the ID of the post_type. Displaying the Result at the Front-EndThis time I entered '768' as the…
…getting a unique instance. Then the getOption() function (line #5) is registering the ID aa_checkbox_in_tab1_panel2 and saving its value in a new variable aa_checkbox_in_tab1_panel2_val.Finally, this variable is used inside an if-else check to print the checkbox setting at the front-end (lines #11 to #15).Displaying the Result at the Front-EndSuppose I…
…getting the values. desc: (string) It displays a brief description. Now some of the optional parameters which you should use are: default: (boolean) In the font type option, this parameter behaves somewhat differently. It takes up an array which contains some default fonts and styles you want to use (more…
…getting the saved values.<?php // 1. Get the titan framework instance and save it to a variable $titan = TitanFramework::getInstance( 'neat' ); // we will initialize $titan only once for every file where we use it. // 2. Get the value via ID using getOption function $aa_radio_in_tab1_panel2_val = $titan->getOption( 'aa_radio_in_tab1_panel2'…
…getting the saved values is pretty much the same as I discussed in the case of an admin panel. The only difference is in line #6, which retrieves the saved value of a specific page or post ID via the get_the_ID() function.Displaying the Results at the Front-EndLet's choose 'Theme Template…