WordPress.org

Ready to get started?Download WordPress

Forums

Style mp3 links differently from other links (5 posts)

  1. 3stripe
    Member
    Posted 8 years ago #

    I'm trying to work out if there's anyway you could automatically make links in my posts ending with .mp3 have a different style than the rest.

    Is this possible or do I need to do it via the enclosures?
    Only problem with enclosures's is they would have to display before/after the post content I guess.

  2. marcy
    Member
    Posted 8 years ago #

    I don't know what enclosures are... but you could make a class, like

    .music
    {
    style stuff
    }

    <a class="music" href="musicfile.mp3">Music file</a>

  3. 3stripe
    Member
    Posted 8 years ago #

    Thanks, that looks good. I'm fine with changing links like that but I've got other folks using the site who won't be able to do that...

    Hmm... maybe I should have a div class for my downloads section and then I could style links in that however I wanted, so long as no-one added any other links to the posts...

  4. marcy
    Member
    Posted 8 years ago #

    Yeah, if the music links are all grouped together in a div that would work well and should be user-proof.

    I'm the only user at my site so I don't know anything about that sort of thing -- hopefully if you need more help someone else will step in.

  5. 3stripe
    Member
    Posted 8 years ago #

    :-D

    Well the only other thing I wondered was if WordPress could add that .music class to links of it's own accord. It must be able to recognise mp3 links as it can add them to a podcast feed all on it's ownsome.

Topic Closed

This topic has been closed to new replies.

About this Topic