WordPress.org

Support

Support » Plugins and Hacks » Hacks » Custom fields: Best practice for list of links

Custom fields: Best practice for list of links

  • [Title de-capped. Please do not shout at us]

    I am a heavy user of custom fields. I am also familiar with add_meta_box technique and many plugin sollutions (such as Custom field template, Flutter, …).

    Quite often, I run into a problem with lists of links appended to post such as this:

    <!--POST-->
    <?php the_content(); ?>
    <ul>
    <?php $links = get_post_meta($post->ID,'links', false); ?>
    <?php foreach ($links as $link) { ?>
    <li><a href="<?php echo $link_adress; ?>"><?php echo $link_text ?></a></li>
    <?php } ?>
    </ul>

    What I need: simple UI that:

    1. enables user to create a link as a custom field with “two values” (link adress AND link text). From user experience point of view, WP wysiwyg add-link feature acts great in tis manner.
    2. is repetitive – maybe “create new box” ajax button would be the way?
    3. would be callable as easy as custom fields

    I believe I am not the only one with such issue, however I wasn’t able to find any sollution even after pretty intensive googling.

    Any suggestions would be higly appreciated. Thank you!

  • The topic ‘Custom fields: Best practice for list of links’ is closed to new replies.