• I am learning WordPress Plugin Development. I have custom post type News. I am taking input using meta-boxes for this custom post.

    I added metabox using below code.

    
    add_meta_box('news_settings', 'News Settings', [ $this, 'news_settings_html' ], 'News', 'normal', 'default');
    

    My meta box code is like below.

    
    public function news_settings_html()
    {
        <?php
            <label for="location">
                <?php _e('Location', 'textdomain');?>
            </label>            
            <input type="text" name="location"/>
        ?>
    }
    

    How can I save this meta-boxes values ?

    • This topic was modified 2 years, 4 months ago by mabufoysal.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Save Custom Post Value’ is closed to new replies.