Make sure that your setup meets the requirements.
Fewbricks 2 is not available in the WordPress Plugin Repository. When Fewbricks 1 was released, I submitted it but it was rejected which I am perfectly fine with.
Please note that Fewbricks2 can not be updated using standard update actions in the WP admin area. This is because I want to focus on Composer and minimize the actions to take and mistakes to make when creating releases.
Fewbricks is available at https://packagist.org/packages/folbert/fewbricks. Please see the link to find which version is the latest and which one you want to tell Composer to require.
Requiring 2.0 would looks like this:
composer require folbert/fewbricks:2.0
This will take care of also installing Advanced Custom Fields: Hidden Field for Fewbricks.
The repository type of the package is “wordpress-plugin” which may be good to know since you will probably want Fewbricks to end up in the plugins directory and not in the default vendor directory for Composer packages (although you can install Fewbricks anywhere as long as you /filters/settings–install_url/). If you want to get started using Composer with WordPress and potentially stepping your WP game up in lots of other ways, I highly recommend using Bedrock from the team behind Roots/Sage .
- If you are installing Fewbricks the old manual way, you must first install the plugin Fewbricks Hidden field for ACF and make sure that its folder is named “acf-fewbricks-hidden”. So head on over to GitHub and get the zip with the https://github.com/folbert/acf-hidden/releases.
- Download the latest release of Fewbricks.
- Install Fewbricks Hidden Field and Fewbricks like you would any other WordPress plugin.
Note that these steps does not have to be done on each update of Fewbricks, only the first time you install it.
Activate the newly installed plugins Fewbricks and Fewbricks Hidden Field for ACF like you would any other WordPress plugin. This is not necessary if Fewbricks is placed for example in the themes directory.
Let’s go to Fields to check out some code.