Custom field with checkbox (5 posts)

  1. wiozan
    Posted 5 years ago #

    Hi i want to make a custom field where i have several checkboxes which if i check them i get a link in the article something like this:
    checkbox: one two three four
    i check one and three
    in the article i have:
    any plugin for this or what can i do?
    or if thats easyer that if i wrote in the custom field one, three than on the site it makes it the proper link.

  2. Pedro Candeias
    Posted 5 years ago #

    You can write the code in you're functions.php or use a plugin. Either way you will need to edit you're template files.

    - Use magic fields plugin.
    - Read this: http://codex.wordpress.org/Using_Custom_Fields_to_attach_images,_links_or_files_to_a_post_easily and This: http://wparena.com/how-to/the-power-of-wordpress-custom-fields/

    Hope it helps.

  3. wiozan
    Posted 5 years ago #

    HI thanks for the links,i used the custom fields template plugin and i managed to get something done i have the checkboxes but if i check 3 boxes it produces 3 customfields whit the same name and on the articles page it only displays the first in the alphabetic order.

    in the php file it looks like this:

    <?php if(get_post_meta($post->ID, 'something', true)) { ?>
    Something: <?php echo get_post_meta($post->ID, 'something', true); ?><?php } ?>

    hows can i make the check boxes put their values in one single custome field, or have all same named customfields appear on the page

    cause i think is a mess to have different customfield for each checkbox and putting it after another in the php file

  4. wiozan
    Posted 5 years ago #

    Some help pls?

  5. wiozan
    Posted 5 years ago #

    Come on someone help me out, this is easy for someone who knows wordpress, i think.

Topic Closed

This topic has been closed to new replies.

About this Topic