How to create a custom category of wordpress admin

i was wondering how I would create a custom tab and page for wordpress admin screen, and save its data. I want a ticker on my main page, and the <li> data would change whenever I have new information available. Instead of editing code directly, I was thinking of creating a category for it, click save, store the data , then use that for the ticker via wp admin page. It’ll be a lot easier to log in there to do it. If i could figure out how to save an input field, i could just use that, since i’ll be the only one changing altering the list of the ticker.

Any ideas?

Related posts

Leave a Reply

1 comment

  1. You might consider the idea of creating a custom post type called ticker. On the custom post type, add a custom field (input field) and store it as the value. Then one option would be to use code of this nature in your homepage template:

    <?php $args = array(
        'numberposts'     => 5, // how many posts will be in the ticker
        'post_type'       => 'ticker',
        'post_status'     => 'publish' ); ?>
    <?php $posts = get_posts( $args ); ?> 
    <?php foreach($lastposts as $post) : setup_postdata($post); ?>
        <div class="ticker">[custom ticker field]</div>
    <?php endforeach; ?>
    

    Before you can do that though, you would have to set up the custom post type. This is one of the most concise tutorials on making custom post types and adding fields to them. This article explains how to set up custom post types from scratch.
    http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/

    One of the args to pay attention to here is: show_ui (should we display an admin panel for this custom post type)

    Or if you don’t want to sort out all that code, you could try to use some combination of these 2 plugins:
    http://wordpress.org/extend/plugins/custom-post-type-ui/
    http://wordpress.org/extend/plugins/custom-field-template