WordPress.org

Ready to get started?Download WordPress

Forums

Custom fields: Best practice for list of links (1 post)

  1. Cibulka
    Member
    Posted 1 year ago #

    [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!

Topic Closed

This topic has been closed to new replies.

About this Topic