Linux 软件免费装

Snippets

开发者 businessxpand
更新时间 2009年9月23日 00:02
PHP版本: 2.6.5 及以上
WordPress版本: 2.8-beta1

标签

theme themes text replacement

下载

0.9

详情介绍:

Do you need a placeholder for a fixed text, like the name of the current band at number one, your affiliate tracking codes, or just the name of your favourite fruit fly? Snippets allows you to create fixed areas within your theme for this text to be displayed, and can easily be updated through your WordPress admin in the appearance menu. The snippet content can also be used in your posts and pages with a simple tag. For theme developers we have included a functions.php file that allows you to create hardcoded snippet areas in your themes that your users can update with their own information. This is the first release, so if you find any bugs then please tell us, if we are not told then they will not be fixed.

安装:

  1. Upload the snippets directory to your /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to new Snippets Setup menu item under the Settings menu.
  4. Add some new fields.
  5. Navigate to the Snippets menu under the Appearance menu.
  6. Add some values to your fields.
  7. Add the following function call to your theme: <?php snippets_value( 'field name' ); ?> where field name is the exact name of the field you want to reference.
  8. Alternatively you can reference the snippet in your content with the follow: [snippets:field name] where field name is the exact name of the field you want to reference.
  9. The functions.php file can be copied to your own theme development to allow you to distribute snippet enabled areas within your themes, please read the comments in the source code of this file for more information on how to use it.