Support » Plugin: SubHeading » Change custom field name

  • Resolved sgwatwp



    The theme I’m currently using uses the custom field _subheading for something internal but I would like to use your plugin. I tried changing the line

    var $tag = 'subheading';

    in index.php of the plugin to something else but I can’t make the change without breaking the plugin.
    Any suggestions?

Viewing 1 replies (of 1 total)
  • Plugin Author Steve



    Instead of changing the tag value, I’d suggest altering the meta_key value defined in the constructor:

    $this->meta_key = '_' . $this->tag;

    Modifying this value instead should keep the plugin functioning as expected, but store the values with a different post_meta key:

    $this->meta_key = '_' . $this->tag . '_plugin';

    This would use the key _subheading_plugin instead of _subheading.

Viewing 1 replies (of 1 total)
  • The topic ‘Change custom field name’ is closed to new replies.