Support » Plugins and Hacks » Need help trying to add text (and link) to WordPress widget?

  • Before I start, I have NO formal experience coding, with CSS, PHP, or WordPress. However, I was able to cobble myself together a widget. However, I’m having trouble in what’s probably a simple task, adding text and a link. Here’s how the coding looks so far:

    function sampleHelloWorld()
    {
    echo “<h2>Hello World</h2>”;
    }

    function widget_myHelloWorld($args) {
    extract($args);
    echo $before_widget;
    echo $before_title;?>See, Hear, Read: <?php echo $after_title;
    amm_getMedia(‘amm_my_first_go’,10);
    echo $after_widget;
    }

    function myHelloWorld_init()
    {
    register_sidebar_widget(__(‘Hello World’), ‘widget_myHelloWorld’);
    }
    add_action(“plugins_loaded”, “myHelloWorld_init”);
    ?>

    Where and how do I place the text/link. I’d like it to be the very first thing below the title (which, in this case is “See, Hear, Read:”) Thanks so much!

  • The topic ‘Need help trying to add text (and link) to WordPress widget?’ is closed to new replies.