Forums

Custom Field Template
singleList = true - no data output! (3 posts)

  1. Nio
    Member
    Posted 7 months ago #

    I use singleList = true and no data are shown (OtherSpecs ex below)

    <tr>
        <th>Dim</th>
        <td><ul>
    <li>1600x2100 mm</li>
    <li>1000x2100 mm</li>
    </ul>
    </td>
      </tr>
      <tr>
        <th>OtherSpecs</th>
        <td><ul>
    <li><ul>
    </li>
    </ul>
    </td>
      </tr>

    http://wordpress.org/extend/plugins/custom-field-template/

  2. Pascal Meunier
    Member
    Posted 3 months ago #

    I just fixed it myself, here is the trick.

    Open custom-field-template.php and update line 3285 for:

    $replace_val .= $before_value . $value . $after_value . "\n";

    Here is the complete (and fixed) code:

    if ( $val['singleList'] == true ) :
    	if ( $before_list ) : $replace_val = $before_list . "\n"; endif;
    	$replace_val .= $before_value . $value . $after_value . "\n";
    	if ( $after_list ) : $replace_val .= $after_list . "\n"; endif;
    endif;

    I will try to contact the author of the actual plugin.

    - Pascal

  3. Nio
    Member
    Posted 3 months ago #

    I can't test it, I'm not managing that project anymore, but thank you anyway :)

Reply

You must log in to post.

About this Plugin

About this Topic