Contact-Export of Metainformation via .csv files
plugin-name.php to the /wp-content/plugins/ directory<form action="<?php the_permalink(); ?>" method="post">
<strong><?php $alt = ""; $i = 1;?></strong>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ($alt == "") { $alt = " alt"; } else { $alt = ""; } ?>
<tr class="contact<?php echo $alt; ?>">
<td><?php echo $i; ?><strong><input type="hidden" name="<?php echo $i; ?>"</strong> value="<?php echo $post->ID; ?>" /></td>
<td class="m-name"><a href="<?php the_permalink(); ?>"><strong><?php echo get_post_meta($post->ID, "vorname", true); ?></strong> <?php echo get_post_meta($post->ID, "nachname", true); ?></a></td>
<td class="m-email"><?php $has_email = get_post_meta($post->ID, "email", true); if ( $has_email == '' ) { echo ' '; } else { ?><a href="mailto:<?php echo get_post_meta($post->ID, 'email', true); ?>"><?php echo get_post_meta($post->ID, "email", true); } ?></a></td>
<td class="m-mobile"><span><?php echo get_post_meta($post->ID, "telefon", true); ?></span></td>
</tr>
<?php $i++; endwhile; else: ?>
<input type="submit" class="button-primary" name="export" value="exportieren">
</form>
Important is, that you add this code, where the post are be generated. You have to modify that code for your wordpress installation!!
Add this code at single.php: `<?php integrate_front(); if (!isset($_POST['next']) && !isset($_POST['export'])) {
(Content of single Site)
}`