Custom Fields
Re-Envisioned
Support General Custom Post Repeater in New Field

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 years, 4 months ago.

  • Creator
    Topic
  • #4622

    markfive
    Participant

    Wanted to create a custom post repeater by extending the select field.

    I’ve created a new field & added some custom

    if ( class_exists( 'RWMB_Field' ) )
    {
        class RWMB_Glossary extends RWMB_Field
        {
        	/**
    		 * Get field HTML
    		 *
    		 * @param mixed $meta
    		 * @param array $field
    		 *
    		 * @return string
    		 */
    		static public function html( $meta, $field )
    		{
    			/*
    			$my_meta = get_post_meta( $post->ID, 'my_meta_name', true )
    			if( !empty( $my_meta ) ){
    			    foreach( $my_meta as $entry ){       
    			        $post_id = $entry['custom_post'];
    			        $my_post = get_post( $post_id );
    			        $c_title = $my_post->post_title
    			        echo "'".$c_title."' => '".$c_title."', " ;
    			    }
    			}
    			*/
    		}
    
    	
        }
    }

    Any idea how I can output a list of my custom post types here?

    *I actually have the core extensions with me but i’m not sure which works best in this case.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.