Linux 软件免费装
Banner图

Advanced Custom Fields: Button Field

开发者 webdevmattcrom
更新时间 2015年2月6日 12:36
捐献地址: 去捐款
PHP版本: 3.4 及以上
WordPress版本: 4.1
版权: GPLv2 or later
版权网址: 版权信息

标签

custom fields acf add on

下载

1.0

详情介绍:

NOTE: This is an extension for the popular Advanced Custom Fields plugin. By itself, this plugin does NOTHING. ENDNOTE Generates a nice button/link to an external url or an internal post type, similar to the page_link field but allows you to override the link text. What makes this great is reducing two ACF rows into just one (see screenshots for a clear visual walkthrough). The internal link also uses a dropdown which is populated from all your post types so the button can link to a media file or a Custom Post Type, or of course to a page or post. NOTE: (I know it was already mentioned, but just to be sure there's no confusion...) This is an extension for the popular Advanced Custom Fields plugin. By itself, this plugin does NOTHING. ENDNOTE Future Plans Not much really. Probably just a couple things as the need arises:

安装:

This add-on can be treated as both a WP plugin and a theme include. Plugin
  1. Copy the 'acf-button' folder into your plugins folder
  2. Activate the plugin via the Plugins admin page
Theme Include
  1. Copy the 'acf-button' folder into your theme folder (can use sub folders). You can place the folder anywhere inside the 'wp-content' directory
  2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-button.php file) ` add_action('acf/register_fields', 'my_register_fields');
function my_register_fields() { include_once('acf-button/acf-button.php'); } ` == Frequently Asked Questions == Why doesn't my link look like a button? I figure if you are using ACF then you're probably pretty comfortable styling this however you like. Can I contribute? I'd LOVE that! Development of this happens over here. When are you going to implement those "Future plans"? As the need arises per client requests. Meaning: Don't hold your breath. Of course, if you want to contribute to those future plans, see previous FAQ.

屏幕截图:

  • You see, just to output a simple link without the magic ACF } Button Field you need these whole TWO rows
  • But with the magic ACF } Button Field, you just need this one.
  • Again. What client wants to deal with this stuff!?
  • Now this! This is what I'm talking about.
  • But what if I just want to link to google.com? Switch it up! There you go, link to whatever the hell you want.

升级注意事项:

1.0
  • Initial release.

更新日志:

Forked from: https://github.com/envex/acf-button-field The original didn't seem to be updated or maintained, and I needed this for a client, so this is the fork. Here's a quick list of the updates made: 1.0