eoinkelly
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [Image Widget] [Plugin: Image Widget] Request: Widget Title and WidthI think you can get the result you want easily enough:
Hard Coded Title
- Create a new folder called “image-widget” in your template directory and copy over the “views/widget-admin.php” and “views/widget.php” files from the plugin directory. If these files exist, the plugin will use these files instead of the ones in it’s own folder. More details here
- ‘widget-admin.php’ contains the admin area interface of the plugin. Open it and comment out the section that asks the user for the title. Then just add a new hidden element that contains a hard-coded title e.g.
<input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="hidden" value="Currently Reading" />
Note that this will hard-code the title for all instances of the widget.
Fixed Width Image
In your theme’s CSS add a rule that forces the width to be whatever you need for your theme./* .widget_sp_image is applied to all instances of the Image Widget */ .widget_sp_image img { max-width: 300px !important; /* Overrides plugin default width, Images can still be narrower than 300px */ /* OR */ width: 300px !important; /* Forces width, narrower images will be stretched */ }
Viewing 1 replies (of 1 total)