Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

xymalf on "Forms and Menus"

$
0
0
* Register and add settings
     */
    public function page_init()
    {
        register_setting(
            'my_option_group', // Option group
            'my_option_name', // Option name
            array( $this, 'sanitize' ) // Sanitize
        );

        add_settings_section(
            'setting_section_id', // ID
            'My Custom Settings', // Title
            array( $this, 'print_section_info' ), // Callback
            'my-setting-admin' // Page
        );  

        add_settings_field(
            'id_number', // ID
            'Amazon Affiliate', // Title
            array( $this, 'id_number_callback' ), // Callback
            'my-setting-admin', // Page
            'setting_section_id' // Section
        );      

        add_settings_field(
            'id_number',
            'Amazon Access',
            array( $this, 'id_number_callback' ),
            'my-setting-admin',
            'setting_section_id'
        );  

	add_settings_field(
            'title',
            'Amazon secret',
            array( $this, 'title_callback' ),
            'my-setting-admin',
            'setting_section_id'
        );

    }

[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

I have wrote the above code but it is only displaying Amazon access and secret on my screen not the affiliate field.
How do I correct this please?
How do I pass the variable to my amazonapi.php code?


Viewing all articles
Browse latest Browse all 8245

Trending Articles