Hi there,
I am now trying to add / remove rows for a couple of custom meta boxes withing the admin area.
Here is how I have created my meta boxes:
function add_feature_meta($post, $metabox)
{
global $post;
$show = '';
$custom = get_post_custom($post->ID);
if (array_key_exists('show', $custom))
{
if ($custom["show"][0] == '1')
{
$show = 'checked';
}
}
include(MY_THEME_FOLDER . '/custom/featuremeta.php');
}
featuremeta.php contain the html:-
<div class="metaarea">
<label for="title">Title</label>
<input type="text" name="title" value='<?php echo $title; ?>'>
</div>
<div class="metaarea">
<label for="subtitle">Description</label>
<input type="text" name="subtitle" value='<?php echo $subtitle; ?>'>
</div>
<div class="metaarea">
<label for="link">Link</label>
<input type="text" name="link" value='<?php echo $link; ?>'>
</div>
I want to be able to add a row and save another set of data. I have seen this done and no idea how to get it working. I am trying not to use plugins as this is a learning exercise.
Thank you kind people