Create ul list in Custom Meta Box?

I need to create an ul list in a Custom Meta Box.

The content/text area of the post is already taken up with other information.

Read More

Is it possible to create another text area like WP built in one so I could us the Unordered list button.

— EDIT —

I’m not sure how else I can describe this.

I know how to create Custom Meta Boxes. I can create text input fields and textarea fields.

I would like a Custom Meta Box that would output the information in it as an Unordered list on the site.

In WP’s textarea in a post I can type text, select it then press the unordered list button to make it into an unordered list.

How can I do this with a Custom Meta Box?

Related posts

Leave a Reply

2 comments

  1. 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

  2. You can create “Custom Fields” that allow you to add additional information to your post, stored as “post meta”.

    There are lot of good plugins available to help with this. I suggest you try “Advanced Custom Fields” (http://wordpress.org/extend/plugins/advanced-custom-fields/).

    — Updated —

    In response to your added details, you have a few options.

    You can add another Visual Editor (using a plugin like Advanced Custom Fields) which would let you use the ordered list tool.

    You could also write your content as HTML, using the <ul> and <li> tags accordingly.

    Last but not least, though more complex, you can pass your values in as comma separated and then loop through them in the template.