Support » Plugins » Get Post Custom for Custom Post

  • I am trying to get the following code to return the gallery slider for the following custom post “advert”.

    function tie_gallery(){
    
    global $post, $tie_blog;
    
    if( is_singular() || tie_get_option( 'on_home' ) != 'grid' || isset( $tie_blog )){
    
        $size  = 'post' ;
    
    }else{
    
        if( tie_post_width() == 'w2' ){
    
            $size  = 'w2' ;
    
        }
    
        elseif( tie_post_width() == 'w3' ){
    
            $size  = 'w3' ;
    
        }
    
        else {
    
            $size  = 'w1' ;
    
        }
    
    }
    
    $speed = 7000 ;
    
    $time = 600;
    
    $effect = 'animation: "fade",';
    
    ?>
    
    <?php 
    
        $custom = get_post_custom($post->ID);
    
        $slider = unserialize( $custom["post_gallery"][0] );
    
        $number = count($slider);
    
        $imgaes = array();
    
        if( $slider ){
    
        foreach( $slider as $slide ){
    
            $image = wp_get_attachment_image_src( $slide['id'] , 'tie-'.$size  );
    
            $imgaes[] = array( $image[0] , $image[1] ,  $image[2]);
    
        }?>
    
    <div class="flexslider">

    I spent hours to figure this puzzle out but no luck. Please help

  • The topic ‘Get Post Custom for Custom Post’ is closed to new replies.