WordPress.org

Ready to get started?Download WordPress

Forums

Update the site description hook? (2 posts)

  1. monkeypigs
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to develop a plugin to get the now laying info from a shoutcast server.

    It works fine as a theme modification,(see easystreamradio.com/home/ for a demo of what I mean) however, I can't find out how to update the site description / tagline via a plugin.

    The script on the site above uses ajax to reload, so not sure if that's gonna cause any additional problems.

    Any vague pointers at this stage welcome!

  2. monkeypigs
    Member
    Posted 1 year ago #

    OK,

    So after a bit of digging I found this post:

    http://wordpress.org/support/topic/can-somebody-please-tell-me-how-to-use-the-bloginfo-filter?replies=3
    and I now have

    require('playing.php');
    function replace_description($description) {
    // do something to $description
    $description=$now_playing;
    return $description;
    }
    add_filter('option_blogdescription','replace_description');

    Trouble is this adds the info right at the top of the page (see a demo here)

    Any one able to give me a kick in the right direction?

Topic Closed

This topic has been closed to new replies.

About this Topic