开发者 | wpmarkuk |
---|---|
更新时间 | 2015年12月19日 21:29 |
捐献地址: | 去捐款 |
PHP版本: | 4.3.1 及以上 |
WordPress版本: | 4.4 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/plugin-name
directory, or install the plugin through the WordPress plugins screen directly.Yes you can easily change the markup. The widgets output is actually controlled by a function hooked into the ffpw_featured_post_output
. Therefore to add your own markup you would need to remove the action included, create your own function for the markup (use the one provided as a starting point) and then add your function to the action hook. Take a look at this example which just outputs the featured posts' title linking to the post permalink:
`
post_title ); ?>
`
https://gist.github.com/wpmark/1f55055ec175cd74d481
This can be done using the built in filter ffpw_widget_options_fields
. The following code would add a new textarea for an intro paragraph:
`
'intro_text',
'type' => 'textarea',
'label' => 'Introduction Text',
'desc' => 'Add some introduction text for featured posts here.'
);
return $fields;
}
add_filter( 'ffpw_widget_options_fields', 'wpmark_add_ffpw_intro_field', 9, 1 );
?>
`
You would have to use the action hooks in the widget output function in order to output your new field on the front-end.