Just without giving much thought:
1. You can easily filter your data. For example if you created a Real Estate Site, you can now easily have filters to display properties only in a certain area, between price ranges, how many bedrooms, etc… I use the plugin Filter Everything, it gets 10 minutes to get used to, but in the end I can create all the filters that I need without any coding.
2. You can easily setup front end submissions and front end editing if you wish.
3. Organize your editing with conditions. For example, the example being a Real Estate site again, if the property is an office building, you can conditionally have a field for how many offices are in the building, while for residential homes, you can have bedrooms instead.
4. I know that with Gutenberg you can have different templates (patterns) to accomplish #3, but with custom fields, editing the data will be much easier, and less time consuming. Furthermore, if you don’t care for #1 and #2, with ACF Pro you can very easily create ACF custom blocks to structure your data and make editing a simpler task, without accidentally messing up the layout.
… And @kevinob , your example worked for me !
Thanks !
If you bought your license before the price changes, then it is truly a one time payment. If you bought your license after the price changes, then you will have to renew annually.
A sure way to find out (without bothering the developers), is to login to your account, and head on to the Subscriptions tab. If there are no subscriptions, your license is for a one time fee, and you will receive updates forever.
I can now confirm John’s solution above is perfect and does the trick like a charm !
Agree 100%.
I did not test it yet, but I guess we have to code a function for it…
https://support.advancedcustomfields.com/forums/topic/default-value-for-datepicker/
You are worrying about the wrong things… In your case your only worry should be the amount of time it will take to do database backups and restorations.
Now, reading from your description of how ACF is been used in your site, all you have to do, is to install a good cache plugin and things will always be fast, no matter how big your database gets, since while your pages are being served on the front end, the data will be coming from static pre-built html pages, and without the need to access the database (technically).
The issue with big databases that custom fields tend to create, is when (parts of) the data cannot be cached, for example, you have a car dealership website and you want to have an advanced, complex (parametric) search. An example to such search might be to list all cars located in London, are newer than the year 2015, and cost less than 20,000 pounds. In this case, the database has to be used to search for the records, and this is when custom fields will disappoint. And also, this is the exact reason why medium to large e-commerce sites that require such advanced searches will always opt for Magento, etc… over Woocommerce. There are 2 plugins (one free and one premium) that sort of mitigate this database issue, but neither of them support complex fields such as the repeater yet…
Anyway, in our case however, you will be just fine, have patience with your backups and install a good cache plugin.
https://wordpress.org/plugins/calculated-fields-for-acf/
Documentation here: https://www.wundermatics.com/docs-category/calculated-fields-for-acf/
The calculations will be done on the front end AND the backend, and the results will be saved in an ACF numeric field. As a result, you can export the data to a spreadsheet for example, and the calculated results will be included. Look at the examples and documentation, the possibilities are endless, including calculating repeater fields.
Also, you can perform the calculations within Meta boxes or ACF Gutenberg Blocks, your choice…
Note: I am very biased towards this plugin, as I’m listed as a contributor.
This is from experience… If you did everything that you were supposed to and you get some results you can’t explain, especially right after updating WP, themes, or plugins, clear the cache, to get rid of the locally stored CSS and especially any js files, and get the new ones. In chrome you can do so very easily with Ctrl + F5… It happens to me almost every time I update ACF, or Gutenberg.
Did you create a Field Group with the start_date and end_date fields?
I had misunderstood your question… this is something I can use too… I will dedicate the next weekend to experiment with this, and I’ll post back here if I manage to find a solution. I’ve done 51 ACF blocks, bunch of Block Patterns (which are awesome and very easy to do), but never a template… time to dive into templates I guess now…
Your question is not clear. Did you register your block to start in the preview mode? Then, when you load the block, you need to switch to edit mode. Or, if you registered the block in auto mode, then simply click on the block to automatically change it to the edit mode. Are you talking about having default values? You do that in the Field Groups when creating the fields… I can go on and on…
P.S Clicking the pencil icon on the toolbar will change the mode to edit, and when you click on the Monitor icon next, you will go back from the edit mode to the preview mode.
Follow the example found on this page: https://www.advancedcustomfields.com/resources/blocks/
and continue reading this: https://www.advancedcustomfields.com/resources/acf_register_block_type/
I hope you can solve your issues !
I am waiting for the ACF Custom Database Tables to support Repeater fields, before I buy it. If you don’t use repeater fields it would be worth spending the money and getting it now, however if most of the data will be stored in repeater fields, the current version would be near useless, or more politically correct putting, less helpful…
Unless you need front end forms, and complex front end searches, a better solution for keeping the database small might be to create your project using ACF blocks instead of Custom Fields. The database size difference between using Blocks Vs custom fields will be astronomical, very quickly!
Simple answer – it is not possible.
Long Answer – Gutenberg stores all the blocks of a page in one long serialized data field. There is no way (that I know of, or at lest yet) a way to identify and map fields to import or even export any type of data.
– The biggest advantage of Gutenberg is keeping the database size relatively very small as oppose to using Custom Fields – in fact the size differences between the two are astronomical.
– Because Gutenberg mixes content (data) and design, as we all knew previously not to do so until now, we cannot have front end forms, and complex search forms, searching data on multiple search criteria, like finding a house to buy, price being less than $i million, with at least 4 bedrooms, and a swimming pool. I dare ANYONE to show me how to do these 2 things with Gutenberg.
– Of course with Custom Fields, we can import/export data from let’s say a csv file, have front end forms, and even perform complex searches. The biggest disadvantage is that even with a modest sized website, your database is going to grow impressively big, and very fast.
1. If you are going to use the repeater field, you do need to purchase the Pro version.
2. I am not sure if pulling custom field data from one site to another is possible.
Now, Unless there are other things in what you need, why complicate things and even install any plugins to slow the sites, just put the information on each site statically and be done with it.
Use the TGM Plugin Activation class… http://tgmpluginactivation.com/download/
I also wanted to get meta data values in a block, and after trying everything, and eventually opening a ticket about it, and the simple answer I got was “it is not possible”.
This should have been a hint, but I tried anyways: – https://www.advancedcustomfields.com/resources/blocks/
Under the heading “Anywhere and Everywhere”, it says that “ACF blocks are not tied to metadata…”. I knew this going in, but I had to “force” a solution, needless to say, it was a total fail.
After testing, the answer is acf/YOUR_BLOCK_NAME. You can see the names of all the blocks when you switch to the Gutenberg’s Code Editor – access it from the Gutenberg’s options tab…
“Also, when both ACF PRO and Gutenberg 6.4 are active, my ACF Block with a wysiwyg field in it does not seem to initialize the tinymce editor easily when I click into it.”
Besides the warning message I showed in my screencast, I also get the tinymce initialization issue, BUT only when going from preview to edit mode. Clicking the “Visual” or “Text” tabs forces TinyMCE to wake up and come to life !
This is not going to happen with ACF according to Elliot – read the conversation I had with him:
https://github.com/AdvancedCustomFields/acf/issues/212
Elliot’s last response on the matter that I know of, is that he is going to look at it at the end of the year, BUT, he also warned us that, by doing so, this will open a “can of worms”, which worries me a bit.
With the latest Gutenberg developments, I don’t think we “really” need inner-blocks anymore. If you install the latest Gutenberg plugin, which will override the core’s version, we can do anything we desire… BTW, the core’s Gut. version is v5.3, while the plugin right now is at v6.2.
The Cover block can now accept all blocks, and not just heading, paragraph and button anymore. As a background in a Cover block, as usual we can have color, image or video. We can use the cover as a container – no problems.
The Group block, can only have background colors, but soon it will also support also images, videos and even gradient colors. They are currently working on this…
I’m not sure about this, but I think that these background options will also be available to the Columns block.
So, for the time being, my recommendation install the Gutenberg plugin, and is to place your ACF blocks inside a Group or Cover block, and in the meantime let’s wait an see how Gutenberg and ACF Pro will progress with their developments.
Let me try again !
1. ACF Blocks, unlike normal blocks, are 100% dynamic. https://www.advancedcustomfields.com/resources/blocks/ – The faq “Can I make changes to the template? confirms that fact.
2. Here is a video proof that it CAN be done with ACF – and I’m not done yet, I will be adding more features to it…
https://www.youtube.com/watch?v=_jlS9tOqBBY&feature=youtu.be
Of course you can… why would you think you would not? The rendering file, is actually a php file, so what do you think would stop you. From the plugin repository if you download the “ACF Blocks” – https://wordpress.org/plugins/acf-blocks/ there is a Post Block just to prove that it is possible.
The reason to use Gutenberg blocks as oppose to shortcodes are very obvious, besides, your customers will prefer to click things to work, as oppose to using shortcodes.
Actually it is possible with the help of 2 tiny plugins, and a little bit of imagination !
1. The block(s) that are going to be used in TinyMCE must be Reusable ones. So step one is to create the Reusable blocks…
2. Install the plugin “Block Widget” (https://wordpress.org/plugins/block-widget/), this will put a Reusable block in a widget (and only a reusable block) – this is the reason step one was needed.
3. Install the plugin “Widget Shortcode”, get the shortcode for the Nlock Widget from step 2, and place it in your editor.
Still don’t believe me? Watch this … https://www.youtube.com/watch?v=OI4Fe6XZmag&feature=youtu.be
In my case, because I create my own themes, and in it I have created my own shortcodes, I had to create the editor’s toolbar buttons myself to generate the shortcodes. In many cases various themes will do the same as will some shortcode plugins. It is coded in JavaScript, and the best documentation how to do that is from the TinyMCE documentation pages I guess, or look at the code of a theme or plugin that generates the code for the shortcode buttons.
Many of you however are jumping the gun… Gutenberg already has a columns block, and also a Group block, which basically can act as a container. Make sure you also activate the Gutenberg plugin in your site to get all the latest features. With the Gutenberg plugin activated, you can have variable width columns, and if your theme has “align” support you can make it act more like a section (full width and what not) more easily. Also, you can assign the vertical alignment of each column independently, something which I don’t think is possible even with WPBakery. Finally, by placing the columns block inside the Group block, you can easily add background color. By the time Elliot will add inner-blocks support, Gutenberg will probably have the option to also add background images and probably even background videos to the Group block. Gutenberg is getting better every week, unfortunately it should have been merged to the core at the end of this year, not last. I’m saying all this because if you don’t know what you are doing, and you need to learn and experiment, and by the time you are done, Gutenberg will probably have all the minimum features that any page builder needs to create layouts. If however, you are impatient like me, and have things in place, and thanks to ACF, building these things don’t take very long, go ahead and build your own containers and columns… pretty soon they will be alternative methods to the native Gutenberg blocks, at best.
I threw a lot of things at you, let me know if you want to see a short video demo about everything I said, how to create columns and containers with ACF (with what ACF allows us to so so far), and all the Gutenberg options, including manually adding some background images for the Group or Columns blocks – using Microthemer in this case is a breeze !
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.