WordPress Setting API script are not showing in submenu

Question

enter image description here

I cant not recognize where is my problem. Anyone can check my script https://github.com/devrashed/devrashed/tree/main/themex%20plugin how to fix it.

setting_page.php

class settings_page
{

public function setup_sections() {

add_settings_section( 'our_first_section', 'My First Section Title', array( $this, 'section_callback' ), 'smashing_fields' );

add_settings_section( 'our_second_section', 'My Second Section Title', array( $this, 'section_callback' ), 'smashing_fields' );

add_settings_section( 'our_third_section', 'My Third Section Title', array( $this, 'section_callback' ), 'smashing_fields' );

}

public function section_callback( $arguments ) {

switch ($arguments['id'] ){
    case 'our_first_section':
        echo 'This is the first description here!';
        break;

    case 'our_second_section':
        echo 'This one is number two';
        break;

    case 'our_third_section':
        echo 'Third time is the charm!';
        break;
}

}

public function setup_fields() {

add_settings_field( 'our_first_field', 'Field Name', array( $this, 'field_callback' ), 'smashing_fields', 'our_first_section' );

}

public function field_callback( $arguments ) {
echo ”;

register_setting( 'smashing_fields', 'our_first_field' );

}

} /END the setting class/

?>

0
phplover 2 months 0 Answers 9 views 0

Leave an answer