Been using ACF pretty much since the beginning, but I have always wondered why we can’t create simple, one line textfields and add basic formatting options to them like bold, italic, or links.
I want to keep the admin as clean, simple, and clutter free as possible. But being able to add italic to text without having to write it in HTML is important to many clients. That being said, when these options become necessary for a very simple field, something in which a single word, or a simple phrase will be entered, having to transform that textfield into a WYSIWIG content editor creates a lot of clutter on the admin.
Having the option to determine what basic options are (I’m thinking mainly bold, italic and links, options adapted to one-line text inputs) to the basic textfield would be an incredible addition!
For this case, you need to create a function that will convert certain patterns to certain HTML tags. You can use the preg_replace() function to do it. For example, if you want to convert the words between stars (*) into italic, you can use this code:
Page Builder Summit Sponsors! BIG thanks to these people who’ve sponsored the Page Builder Summit: Akshat Choudhary from WP Remote @wpremote Elliot Condon from ACF @wp_acf Dimitrie Baitanciuc from Brizy @themefuse Dennis Dornon from MainWP @mymainwp