Custom Field Template
[resolved] Custom Field Template box title not correct (1 post)

  1. eqhes
    Posted 5 years ago #

    The problem: Custom Field Template box title shows the title of the Template #0, not the template I'm using for the current content type.

    To reproduce the problem:
    0) I'm using "Custom Field Template" 1.7.5.
    1) Use more than one template and each one for a different content type. For example: "template #0" for "content-type-0" and "template #1" for "content-type-1".
    2) Check this option on the Global Settings box: "In case that you would like to replace the box title with the template title.".
    3) Following my example, try to add a new post on "content-type-1". Here you will see the Custom Field Template box and its title will be the "template #0" title instead of the "template #1" title.

    Solution: on "custom-field-template.php" replace the line 4755, which looks like this:
    $out .= 'jQuery(document).ready(function() {jQuery(\'#cftdiv h3 span\').text(\'' . $options['custom_fields'][$init_id]['title'] . '\');});' . "\n"
    With this code:
    $out .= 'jQuery(document).ready(function() {jQuery(\'#cftdiv h3 span\').text( jQuery(\'#custom_field_template_select :selected\').text() );});' . "\n";

    Right now it's working pretty fine for me :).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Field Template
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic