Sascha's Wiki

Custom Field Template Plugin

<?php

        $fields = get_post_meta( get_the_ID(), 'zutat' );
        $names  = get_post_meta( get_the_ID(), 'zutat_name');
        $einheit= get_post_meta( get_the_ID(), 'zutat_einheit');
        $menge  = get_post_meta( get_the_ID(), 'zutat_menge');
        $desc   = get_post_meta( get_the_ID(), 'zutat_beschreibung');
        $max = $fields[0][0]; 
        for ($i = 0; $i < $max; $i++) {
                echo "<li>$menge[$i]$einheit[$i]    $names[$i]  $desc[$i] </li>";
        }

?>

webdev/wordpress/plugincft.txt · Zuletzt geändert: 2016/04/21 09:15 (Externe Bearbeitung)