Thanks for the reply Hunk.
I actually did stumble across that post earlier but couldn't get it to
work properly. I could only get it to display the first audio clip in
the group. The "Next Chapter" link would still appear but when
clicked, it just showed the same clip.
I'm not really an expert at PHP so it could be I'm just doing
something wrong. You can see my code below (its just a rework of your
code from that previous post). If you have any ideas of what I'm doing
wrong, I can really use the help. Thanks.
$chapter = 1;
if( isset($_GET['Audio Clip']) ){
$chapter = (int)$_GET['Audio Clip'];
if(!$chapter) $chapter = 1;
}
if( $chapter > 0){
$chapters = getGroupOrder('audio_clip_title');
if(in_array($chapter,$chapters)){
printf('<div class="audio_clip bg_gradient"><h3>%s</
h3>',get('audio_clip_title',$chapter));
printf('<p>%s</p>',get('audio_clip_description',$chapter));
printf('<p>Content: %s</p></div>',get('audio_clip_description',
$chapter));
$check = strpos(get_permalink(),'?p=');
if ($check === false) {
$pre = '?';
}else{
$pre = '&';
}
printf('<div>');
if($chapter > 1){
printf('<a href="%s%schapter=%s">Prev Chapter</a>
',get_permalink(),$pre,$chapter-1);
}
if( $chapter < count($chapters)){
printf('<a href="%s%schapter=%s">Next Chapter</
a>',get_permalink(),$pre,$chapter+1);
}
printf('</div>');
}
}
On Mar 25, 5:03 pm, Hunk <
ing.ed...@gmail.com> wrote:
> Hi adam check this topichttps://
groups.google.com/d/topic/magic-fields/F6-Gn2dCO-g/discussion