Bonjour,
Ma configuration WP actuelle
– Version de WordPress : 3.2.1
– Version de PHP/MySQL :
– Thème utilisé : bitter
– Extensions en place :
– Nom de l’hebergeur :
– Adresse du site :
Problème(s) rencontré(s) :
bonjour
je cherche a faire des champs personnalisés et tout fonctionne bien jusqu’a l’affichage de ceux ci
j’ai crée dans function.php
/* TAXONOMIE, rajout de champs pour l’equipement*************************/
add_action(‘init’, ‘my_custom_init’);
function my_custom_init()
{
register_post_type(‘equipement’, array(
‘label’ => __(‘Equipements’),
‘singular_label’ => __(‘Equipement’),
‘public’ => true,
‘show_ui’ => true,
‘capability_type’ => ‘post’,
‘hierarchical’ => false,
‘supports’ => array(‘title’, ‘author’, ‘editor’,’thumbnail’,’custom-fields’,’page-attributes’)));
register_taxonomy( ‘type’, ‘equipement’, array( ‘hierarchical’ => true, ‘label’ => ‘localisation’, ‘query_var’ => true, ‘rewrite’ => true ) );
register_taxonomy( ‘couleur’, ‘equipement’, array( ‘hierarchical’ => true, ‘label’ => ‘contact’, ‘query_var’ => true, ‘rewrite’ => true ) );
}
puis dans une page single-equipement.php
<?php
while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?> » <?php post_class(); ?>>
<h2><?php the_title(); ?></h2>
<?php echo get_the_term_list( $post->ID, ‘localisation’, ‘<p>Type de projet : ‘, ‘, ‘, ‘</p>‘ ) ?>
<?php echo get_the_term_list( $post->ID, ‘couleur’, ‘<p>Couleurs : ‘, ‘, ‘, ‘</p>‘ ) ?>
<?php require_once (TEMPLATEPATH . '/single-equipement.php'); ?>
</div>
<?php endwhile;
seulement ca bug quand on appelle get_term_list…
Catchable fatal error: Object of class WP_Error could not be converted to string in /homepages/46/d331605444/htdocs/wp-content/themes/Bitter/single-equipement.php on line 12
quelqu’un peut il me dire d’ou vient le bug?
merci
Nadege