Create ul list in Custom Meta Box?

You can add your information in regular metabox textarea and separate prospective list items with new line. Then just format it as list in your template:

<?php
$list_items = get_post_meta($post->ID, 'your_custom_field_name', true);
     if($list_items){
        $list_items = explode("\n", $list_items)
            echo '<ul>';
                foreach($list_items as $list_item) {
                    echo '<li>' . $list_item . '</li>';
                }
            echo '</ul>';
    }

Or you can add one more TinyMCE editor (like the one for post text) as described here: Custom fields or something else

Leave a Comment