Need help trying to add text (and link) to WordPress widget? (1 post)

  1. markbesada
    Posted 7 years ago #

    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) {
    echo $before_widget;
    echo $before_title;?>See, Hear, Read: <?php echo $after_title;
    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!

Topic Closed

This topic has been closed to new replies.

About this Topic