SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WordPress : How to add an icon (camera) to post title indicating video content

    The client wants a few things. First, to show an icon of a camera next to the post title (in the main Loop) when the post contains a video clip.

    Do I need to use category tags or a custom post type to identify which posts get the icon? If so, how does this alter the default Loop query. I'm still getting the hang of the various ways of querying the posts although I'm adept with php.

    Also, the client wants the video hidden at first. I can do this with jQuery. Clicking the post title would reveal the video (actually just a screenshot). Then clicking the "video screen" would launch a lightbox clone plugin.

    Thanks in advance

  2. #2
    SitePoint Zealot mike.fro's Avatar
    Join Date
    Jun 2005
    Location
    Lewisville, Texas
    Posts
    132
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mgm_03 View Post
    The client wants a few things. First, to show an icon of a camera next to the post title (in the main Loop) when the post contains a video clip.

    Do I need to use category tags or a custom post type to identify which posts get the icon? If so, how does this alter the default Loop query. I'm still getting the hang of the various ways of querying the posts although I'm adept with php.

    Also, the client wants the video hidden at first. I can do this with jQuery. Clicking the post title would reveal the video (actually just a screenshot). Then clicking the "video screen" would launch a lightbox clone plugin.

    Thanks in advance
    Try working with custom values, the following code should help you retrieve them:

    PHP Code:
    <?php get_post_custom_values("video"); ?>
    A simple if call should do the trick. Otherwise this could be achieved via a custom hook.
    Michael John Froseth

  3. #3
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks for the tips on both of my posts.

    I solved this one with minor modifications. I basically checked to see if the post was in category (video) and if so, added a camera icon. Then, to see the video instead of what would normally be the excerpt, I did the same thing in the deffault Loop and displayed the_content() instead so that the video appears instead. But I will use your tip for other needs.

  4. #4
    SitePoint Zealot mike.fro's Avatar
    Join Date
    Jun 2005
    Location
    Lewisville, Texas
    Posts
    132
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mgm_03 View Post
    Many thanks for the tips on both of my posts.

    I solved this one with minor modifications. I basically checked to see if the post was in category (video) and if so, added a camera icon. Then, to see the video instead of what would normally be the excerpt, I did the same thing in the deffault Loop and displayed the_content() instead so that the video appears instead. But I will use your tip for other needs.
    Anytime! Best of luck on your adventures with Wordpress!
    Michael John Froseth


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •