WordPress.org

Ready to get started?Download WordPress

Forums

podPress
adding classes to the different display links (3 posts)

  1. david hickox
    Member
    Posted 2 years ago #

    i am using pod press to host files for a church site. their requirements are that the site have a link for streaming audio, a link for downloadable audio, and a link for downloadable pdf order of worship. the problem in trying to style any of this is that there are no associated classes with any of those links.

    i've found that in podpress_theme.php, the streaming audio is spit out on a different line than the downloadable content, so hardcoding a style in there was fine. the dead-end i've run into, though, is that both the downloadable audio and the downloadable pdf links are spit out by the same line of code, so there's no way to differentiate between the two.

    in the wp-admin, i am assigning a file type to each item i upload. is there a way to pull this information into the a tag in a way that would let me style the links to the two different content types differently?

  2. ntm
    Member
    Plugin Author

    Posted 2 years ago #

    Hi David,

    that is an interesting idea and it is probably no problem to add class attributes to all the elements in the line below the player.
    I have uploaded some modifications which will do that.
    The class names are:

    • class="podPress_downloadlinks podPress_downloadlinks_audio_mp3" - for whole section (line)
    • class="podpress_downloadimglink podpress_downloadimglink_audio_mp3" - for <a> of the button/icon element
    • class="podPress_imgicon podpress_imgicon_audio_mp3" - for the <img> element
    • class="podpress_mediafile_title podpress_mediafile_title_audio_mp3" - for the episode title
    • class="podpress_mediafile_dursize podpress_mediafile_dursize_audio_mp3" - for the duration and file size display
    • class="podpress_playlink podpress_playlink_audio_mp3" - for the "Play Now/Hide Player" link
    • class="podpress_playinpopup podpress_playinpopup_audio_mp3" - for the "Play in Popup" link
    • class="podpress_downloadlink podpress_downloadlink_audio_mp3" - for the "Download" link
    • class="podpress_downloadnr podpress_downloadnr_audio_mp3" - for the download numbers (if visible)

    Please, note that the capitalization of some of the names.

    These modifications are part of the Development Version (which is at the moment 8.8.10.10 plus these modifications).

    Is that what you meant?

    Regards,
    Tim

  3. ntm
    Member
    Plugin Author

    Posted 2 years ago #

    additional explanation:
    The class names in the list above are the names in case the media file is an mp3 audio file.
    The first class name is for the element e.g. the download link.
    The second class name consists of the first class name and depending on the general type of the media file (audio, video, embed, ebook or misc) and the specific file type of the media file (e.g. mp3, m4a, ogg, etc.)
    For instance the class names of the download link elements in case of m4a files are class="podpress_downloadlink podpress_downloadlink_audio_m4a" and for PDF files the class names are class="podpress_downloadlink podpress_downloadlink_ebook_pdf".

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags