[Plugin: Custom Field Template] Strange doubled output from fields (within the loop)
-
Hi!
I really love this plugin π
At the moment I am buidling an event table for a clients website.
I am using the Custom Field Template plugin for building a table structure to show the events with detailed informations.
Presently I am recognizeing a strange doubled output from custom fields.To explain the situation:
In every table row I am using the same fields. The output is realized by ‘the loop’ from a category of posts.In my template I am getting the custom field values like this:
// Custom Field: 'Event Preis' if(get_post_meta($postID, 'Event Preis', true)) : $ev_temp='Event Preis'; $ev_preis = get_post_meta($postID, $ev_temp, true); endif;
The output is realized like this:
<td class="ev-preis"><?php echo $ev_preis; ?></td>
My custom field template contains the following related entry:
[Event Preis]
type = text
blank = true
default =
size = 20
label = blaI have recognized that sometimes the output from one post custom field comes double!
For example when I fill in ‘1000’ in the custom field named ‘Event Preis’ for one post and I leave it blanc for another post, the output for this field is ‘1000’ also for the table row of the entry/post in which I left the field blank before.I cannot reproduce this behaviuor. It seem to appear sometimes and sometimes not.
It’s a puzzle to me. Why it seems that there is a content of a custome field even when I leave the field blank?
I try to set ‘default =’ oder ‘default = ‘ but with no effect.
How can I disable an output when a field is left blank.
Or how can I define a default value which is blank or 0.By the way, in the description of ‘Custom Field Template’ there are many options that I do not understand.
For example: Adds the blank option. (blank = true)
I don’t know what it means … also many other things are not clear for me, but this is another topic.
It would be very nice if you (Hiroaki Miyashita) can explain the different options more detailed.Is there anybody who can help me with the problem mentoined above?
- The topic ‘[Plugin: Custom Field Template] Strange doubled output from fields (within the loop)’ is closed to new replies.