Ho installato il plugin Custom Content type ed ho creato un tipo di contenuto ad hoc “persona” avente un campo content ed alcuni campi text:
nome
cognome
residenza
Ho poi creato un file single-persona.php incollandoci il codice ottenuto dalla comoda funzione “view sample template”, purtroppo quando visualizzo la pagina i campi “text” non vengono visualizzati….
questo è il codice del file single-persona.php ad occhio mi sembrerebbe tutto corretto:
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<h2>Custom Fields</h2>
Nome <?php print_custom_field(‘Nome’); ?>
Padre <?php print_custom_field(‘Cognome’); ?>
Madre <?php print_custom_field(‘Residenza’); ?>
<?php endwhile; // end of the loop. ?>