Howdy, Stranger!

It looks like you're new here. If you want to take part in the discussions, click one of these buttons!

Sign In Apply for Membership

In this Discussion

Wordpress PluginsWordpress Automatic Youtube - Video List Offset

  • 0 points-+

    Hello,I just stated using your Wordpress Automatic Youtube and I think it's an excellent plugin. One thing that I would like to do though is be able to offset the posts that show up in the video list by one. In other words I would like the video list to not display the most current Youtube video. Is there a way that I can do that? I don't mind altering the code in the plugin myself but I'm just not sure what to add to the code to get it to do this. Thank you...

  • 0 points-+

    If I understand what you're asking try this:

    Change line 626 of tern_wp_youtube.php from this: $p = $wpdb->get_results("select ID from $wpdb->posts as p join $wpdb->term_relationships as r on (r.object_id = p.ID and r.term_taxonomy_id = ".$o['category'].") left join $wpdb->postmeta as m on (p.ID = m.post_id and m.meta_key = '_tern_wp_youtube_published') order by m.meta_value desc limit ".$page.','.$o['limit']);

    to this: $p = $wpdb->get_results("select ID from $wpdb->posts as p join $wpdb->term_relationships as r on (r.object_id = p.ID and r.term_taxonomy_id = ".$o['category'].") left join $wpdb->postmeta as m on (p.ID = m.post_id and m.meta_key = '_tern_wp_youtube_published') order by m.meta_value desc limit ".($page+1).','.$o['limit']);

  • 0 points-+

    Hi ternforum,

    Thank you so much, that worked perfectly... Just so you know, the reason I wanted it to work like that is because on a page I am displaying the most recent video in full size and directly below that I have the list showing my other videos. I didn't want the most recent video to be repeated twice. Thanks again...

  • 0 points-+

    You're very welcome.

Want to take part in this discussion? Click one of these: Sign In Apply for Membership
Site designed by, well, me.