Ich habe ein kleines Plugin geschrieben, das beim Erfassen und Editieren von Beiträgen ein zusätzliches Feld zur Verfügung stellt.
Ich kann einen Wert eingeben und er speichert mir diesen Wert auch in der Tabelle wp_postmeta ab.
Aber er zeigt es nicht nach dem Speichern wieder an.
Warum nicht?
Mein Code:
PHP
function aeb_post_edit_fields($post_id) {
global $post_id;
$key='optionaler_autor';
$single=true; // If set to true then the function will return a single result, as a string. If false, or not set, then the function returns an array of the custom fields.
$optionaler_autor=get_post_meta($post_id, $key, $single);
echo '
<fieldset id="authordiv">
<h3>optionaler Autor</h3>
<input type="text" name="optionaler_autor" id="optionaler_autor" value="'.$optionaler_autor.'">
</fieldset>
';
}
Alles anzeigen
Über Eure Unterstützung würde ich mich freuen.
VG Elke