WordPress.org

Ready to get started?Download WordPress

Forums

SubHeading
[resolved] Change custom field name (2 posts)

  1. sgwatwp
    Member
    Posted 1 year ago #

    Hello,

    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?

    http://wordpress.org/extend/plugins/subheading/

  2. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic