1

I wrote my plugin. How to display the result of the plugin's function to sidebar (widget?)?

<?
function register_form () {
    global $post;
    $test = "testesttest";
    var_dump("testtest");
    return $test;
}
add_action( 'get_header', 'register_form' );
?>

How to display the sidebar this text via the admin panel of wordpress? get it done through a widget? need to create a widget?

1

1 Answer 1

2

I got the following tutorial a very good start for a widget creation:

And I used the tutorial and made my own first widget for my plugin. You can get all my code here in Github.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.