Why won't this code work

  • Unknown's avatar

    I want to use the following two pieces of code on my new blog.

    Stream title: <span id=”cc_stream_info_title”></span>Current song: Loading…Bit rate: <span id=”cc_stream_info_bitrate”></span>Server status: <span id=”cc_stream_info_server”></span>

    <div id=”cc_recent_tracks”>Loading…</div

    When I look at my blog, the code is being displayed, but it’s not doing what it should. I run a radio station and this code shows songs that aare playing and those that will play next. They come from Shoutcast. Is there a way to make them work? To see them in action, visit my old blog at http://www.TheRadioStorm.com.

    The blog I need help with is: (visible only to logged in users)

  • Hi there. It appears that embedding a live stream from shoutcast is not supported. See this thread: https://en.forums.wordpress.com/topic/i-cant-play-shoutcast-radio-with-wp-media-player-now?replies=6

    You might be able to work around it using the information here: http://wpbtips.wordpress.com/2010/07/22/gigya-shortcode-3-widgets/ but I’m afraid that’s as far as I can help you.

  • Unknown's avatar

    I don’t think that code is flash. It is code that displays the song that is currently playing on our station. It does NOT stream the audio. The second bit of code shows the last five songs that have played.

    I also tried to post a form to my sidebar. That too didn’t work properly. Is there a way to simply use HTML code on WordPress?

  • Is there a way to simply use HTML code on WordPress?

    You can use HTML in both the text editor and text widgets, but only certain tags are allowed. You can see which tags are allowed here: http://en.support.wordpress.com/code/

    As for the form: the only way we can add forms is through the contact form shortcode. I don’t know if that will work in a text widget, though. http://en.support.wordpress.com/contact-form/

    It is code that displays the song that is currently playing on our station. It does NOT stream the audio.

    In that case (and I’m merely guessing here) I see nothing in the code you post here that tells it where to get that information. Shouldn’t some part of that code contain a link to your streaming service or website?

  • Unknown's avatar

    Interesting, the URL that I pasted originally isn’t there. Sorry about that, I’m blind and didn’t reread the code with the screen reader, just assumed it was there. Guess that’s what they say about assuming. I’ll try to repost the codes again and see if it works this time.

  • Unknown's avatar

    That code is messed up. Please paste the entire code here between CODE tags so it all displays.

  • Unknown's avatar

    Let’s try this code again…

    Stream title: <span id=”cc_stream_info_title”></span>Current song: Loading…Bit rate: <span id=”cc_stream_info_bitrate”></span>Server status: <span id=”cc_stream_info_server”></span>

  • Unknown's avatar

    Well, it didn’t paste the URL again. No wonder I can’t get it to work. It won’t even display the code here in the forum, more less on the website. Beginning to think WordPress might not be the place for me to host a website. Too many strange things to deal with. I do know how to copy and paste. Not sure why its removing the URL after I post.

  • As raincoaster said, you have to paste the code between CODE tags or it won’t paste here properly. Press the button title “code” directly above the text box where you write your reply. Paste the code and then press the “code” button again. Then we’ll be able to see your code.

  • Unknown's avatar

    `Stream title: <span id=”cc_stream_info_title”></span>Current song: <a id=”cc_stream_info_song” aref=”http://service.ultrastreams.us/tunein.php/mccarty/tunein.pls”>Loading…</a>Bit rate: <span id=”cc_stream_info_bitrate”></span>Server status: <span id=”cc_stream_info_server”></span>

  • I think I’ve figured it out. The code you’re using does not exist in isolation. I had a look at your site’s source code and there’s some JavaScript code elsewhere on your site (line 607 and 608 of the source code) that’s needed for this code to work. As JavaScript is not allowed on WordPress.com, this code won’t work here. Sorry.

  • The topic ‘Why won't this code work’ is closed to new replies.