WP Manifestindependent plugin directory
manifest / content / acf-custom-fallback

ACF Field Fallback WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

A shortcode plugin that extends Advanced Custom Fields and allows you to display a custom fallback text if field content is empty.

★ 0stars
17release downloads
≈10active sites
v2.0.1latest · 3 years ago

Install

Download acf-custom-fallback.zip From the v2.0.1 release on GitHub, Apr 27, 2023

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/anthonyraudino/acf-custom-fallback/releases/download/v2.0.1/acf-custom-fallback.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Advanced Custom Fields Custom Field Fallback Plugin

The Advanced Custom Fields Custom Field Fallback plugin extends the functionality of Advanced Custom Fields (ACF) by allowing you to display a custom fallback text if field content is empty.

Installation

To install the plugin, simply download the zip file from the repository and upload it to your WordPress website via the plugins menu in the WordPress dashboard.

Usage

The plugin provides two shortcodes: [acf_field_fallback] and [acf_checkboxes_list].

[acf_field_fallback] Shortcode

The [acf_field_fallback] shortcode allows you to display the value of an ACF field with fallback text and optional prefix/suffix.

Here's an example shortcode:

[acf_field_fallback field_name="my_field_name" fallback="N/A" prefix="The value is: " suffix="." capitalize="true"]

Here are the options for the [acf_field_fallback] shortcode:

  • field_name: Required. The name of the ACF field you want to display.
  • post_id: Optional. The ID of the post you want to display the field for. Defaults to the current post.
  • fallback: Optional. The fallback text to display if the field is empty. Defaults to "N/A".
  • prefix: Optional. Text to add before the field value. Defaults to empty.
  • suffix: Optional. Text to add after the field value. Defaults to empty.
  • capitalize: Optional. Whether to capitalize the text. Defaults to true.

[acf_checkboxes_list] Shortcode

The [acf_checkboxes_list] shortcode allows you to display the values of an ACF checkboxes field in a list format.

Here's an example shortcode:

[acf_checkboxes_list field_name="my_checkboxes_field_name"]

Here are the options for the [acf_checkboxes_list] shortcode:

  • field_name: Required. The name of the ACF checkboxes field you want to display.
  • post_id: Optional. The ID of the post you want to display the field for. Defaults to the current post.

Example

Let's say you have a custom post type called "Books" with an ACF field called "Author". You want to display the author name on the frontend of your website, but if the author field is empty, you want to display the text "Unknown".

Here's how you could use the [acf_field_fallback] shortcode to achieve this:

  1. Open the post or page where you want to display the author name.
  2. Add the following shortcode to the post or page content:
[acf_field_fallback field_name="author" fallback="Unknown"]
  1. Save the post or page.

Now, when a visitor views the post or page, they will see the author name if it is filled in, and "Unknown" if the author field is empty.

Support

If you have any questions or issues with the plugin, please feel free to open an issue in the repository.

License

This plugin is released under the GNU General Public License v3.0. You are free to modify and distribute the plugin as per your requirements.

Releases

2 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v2.0.1 latest
Apr 27, 2023 3 years ago
acf-custom-fallback.zip
11
Apr 27, 2023 3 years ago
acf-custom-fallback.zip
6

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

A grade

Security

ACF Field Fallback 2.0.1 · audited by WP Registry

No security issues found.

Audited release
2.0.1
Findings
none
Worst severity
—
Content hash
e0916f809561e4a62f640c15…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.