This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 4 years, 8 months ago.

  • Creator
    Topic
  • #253

    clemensgang
    Participant

    hello,

    is it possible to use callbacks, as it is provided in the original wordpress add_meta_box function?

    – add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );
    ( http://codex.wordpress.org/Function_Reference/add_meta_box )

    or is there another possibility to use your meta box tabs plugin with custom html as a callback?

    i’m using something like this for example:

    		add_meta_box(
    			'test_test',
    			'Testing',
    			'test_edit_callback',
    			'post'
    		);}
    
    function test_edit_callback(){
    //custom html / php
    $this = "test";
    echo '<p>'.$this.'</p>';
    }
Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #286

    Anh Tran
    Keymaster

    Hi,

    Unfortunately there’s no way to use this extension without using the Meta Box plugin to register meta boxes.

    If you’re using normal way to register meta boxes as shown in the Codex, you have to write your callback to output the meta box and its content. Thus, everything must be done manually.

    If you use the Meta Box plugin, it handles all that work for you, meaning the output of each custom field in the meta box is handled. And only that way, the “Tabs” extension can join the game, e.g. it can help you to change the output to organise fields in tabs.

    So, briefly, if you want to show fields in tabs, please install and use the Meta Box plugin first, then follow the documentation of “Tabs” extension to show fields in tabs.

    Thank you.

Viewing 1 replies (of 1 total)

The topic ‘callbacks’ is closed to new replies.