DJ Rotator For WordPress
[resolved] Action Hooks (5 posts)

  1. entertheraptor
    Posted 3 years ago #


    I love the DJ Rotator plugin and only need to make the small modification of placing a image button that will link to our live stream underneath the description.

    I read that this can be easily done using Action Hooks, specifically the djwp_after_description hook, this is fine if you have any idea what that means.

    Obviously my coding ability stops at a particular level and I would very much appreciate a dummies guide to how to achieve what I need to with DJ Rotator. Perhaps even a copy and past solution where I only need to change out the URL that the anchor tag is pointing to and the location and filename of the image.

    Thanks in advance.


  2. Greg Rickaby
    Plugin Author

    Posted 3 years ago #

    Open functions.php.

    Copy and paste this code (and edit the HTML to point at your image)

    add_action( 'djwp_after_description', 'child_listen_live_graphic' );
    function child_listen_live_graphic() { ?>
        <a href="http://link-to-listen-live-page"><img src="http://link-to-listen-live-graphic"></a>
    <?php }

    Save. Upload.

  3. entertheraptor
    Posted 3 years ago #

    Thanks heaps for that Greg

  4. Greg Rickaby
    Plugin Author

    Posted 3 years ago #

    My pleasure. I'm going to mark this thread as solved.

  5. joaoparisi
    Posted 3 years ago #

    Good morning.

    I was looking for a plugin like the DJ Rotator for days and for sure he is the best.

    However, I have a small problem.
    I want to know if have to register a default Auto DJ to change with "if" because the times that the DJ is not online, the widget is blank.

    Thank you in advance for your attention and I apologize for my horrible English. lol



Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic