• Hi, out of necessity I’ve added a custom title to your widgets, instead of taking the default post/page title, I think it’d come in useful for some.

    https://pastebin.com/UYtiiAWf

    I also fixed another bug where the title in the appearances menu shows ‘true’ rather than the chosen post/page for a widget, which is included in this patch.

    Basically, by adding a title form field to the form() function of a widget, the title shows up. This will sort out the problem:

    <input type="hidden" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr($instance['title']); ?>" />

    Hopefully this’ll make it in the next update!

  • The topic ‘Patch for custom titles’ is closed to new replies.