More Than Just Another Basic ACF Options Page Tutorial (Conditions + Options Page = Power!)

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • ACF Options page can be extremely powerful, but often the tutorials and examples found elsewhere show basic use cases like phone numbers and email addressees. While this is still useful, I wanted to show something more creative.
    In this video, I'm showing you how to control entire pieces of functionality on your site with the combination of an ACF Options page and the free Block Visibility plugin for WordPress.
    This is in my real starter website for my monthly website for HOAs, so this is not only a practical example but it's something I'm using in the real world.
    Hope you enjoy!
    Join this channel to get access to perks:
    / @permaslug
    -- More --
    Signup for my newsletter: jonathanjernigan.com/newsletter/
    Support the channel by becoming a member!
  • Věda a technologie

Komentáře • 16

  • @mrnordjr
    @mrnordjr Před 5 měsíci +2

    he has risen.....

  • @kylevandeusen
    @kylevandeusen Před 6 měsíci +1

    Dude, this is an epic example. You're totally right - I'm very limited by my imagination. This is a really cool example to get my wheels turning!

  • @davidkeevis339
    @davidkeevis339 Před 5 měsíci

    Great concept for employing conditional logic without PHP behind the scenes. Block Visibility is crazy powerful and totally amazing that it's a free one. I've been using it to exploit great desktop layouts that don't fly on mobile - the key thing is BV takes markup out of the DOM. Of course, that can be one of those double-edged swords... Thanks for the time on this one.

    • @Permaslug
      @Permaslug  Před 5 měsíci

      Agreed, it's amazingly powerful and also insane that it's totally free

  • @IvanOung
    @IvanOung Před 5 měsíci

    Loving it, thanks Jonathan!

  • @mclouds888
    @mclouds888 Před 5 měsíci

    Thank you, Jonathan! quick and easy

  • @BjarneOldrup
    @BjarneOldrup Před 5 měsíci

    Customers appreciate when given more control without having to fear messing things up. A registration enabled field is a great example. Thank you, Jonathan. Will you link to whatever "display conditions" plugin you used? Should we be aware of caching? What block would you use to display, say, a phone number stored in an ACF option page field?

    • @Permaslug
      @Permaslug  Před 5 měsíci +1

      Absolutely, great point that clients can modify things without risk of major breakage.
      The block visibility plugin is here: wordpress.org/plugins/block-visibility/
      I haven't run into any issues with caching, but that's definitely worth double checking!
      As far as displaying a phone number, you might have to write a custom function for that if your builder doesn't support pulling dynamic data from an options page. ChatGPT to the rescue on that one!

  • @sebastian.schwarz
    @sebastian.schwarz Před 5 měsíci

    Great use case, Jonathan! Thank you for sharing this video! I love using ACF options pages to safely give clients control over basic parameters of their website. In the video you mention, that there are better/different ways to handle basic contact data like phone numbers, addresses, etc. Would you mind explaining why you prefer to not store this data on the options page and how you handle this on your sites?

    • @Permaslug
      @Permaslug  Před 5 měsíci +1

      I just put those directly inside my main templates because the information changes so seldom. Also because I use the block editor, you can use Patterns/Reusable Blocks for that kind of information, or in the case of GeneratePress you can use Elements and Hooks, all of which to me are a better experience than an options page

  • @torbenheikelvinther4535
    @torbenheikelvinther4535 Před 5 měsíci

    Great Jonathan. I wonder, how do you reference the Assacation Logo in the block editor or other places? In GenerateBlocks for instance I often use the Dynamic Data but it doesn't support the use of Options Page in Data Source!

    • @Permaslug
      @Permaslug  Před 5 měsíci +1

      I actually got the code for the logo on the options page from a premium GeneratePress snippet website by Taylor Drayson: snippetclub.com/set-logo-in-generatepress-from-acf-options-page/