Last active
October 31, 2018 17:29
-
-
Save iamandrewpeters/1518e5e229fc6cb8ebfc82e7d8b44d67 to your computer and use it in GitHub Desktop.
Description of Shortcode for Staff Email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//How Conditional Shortcodes work to diplay this | |
[wpbb-if some-field-connection-shortcode] | |
<a href="[some-field-connection-shortcode]">my email icon</a> | |
[/wpbb-if] | |
[wpbb-if post:acf type='url' name='church_information_staff_email'] | |
<a href="mailto:[wpbb post:acf type='url' name='church_information_staff_email']"><span class="fas fa-envelope-open"></span></a> | |
[/wpbb-if] | |
//What we have here is a Beaver Builder shortcode that is conditional. | |
//What it is saying is this IF the field for staff email is filled in | |
//THEN display the envelope icon and link it to the staff email. | |
Here's my IF: | |
[wpbb-if post:acf type='url' name='church_information_staff_email'] | |
Here's the icon with the link: | |
[<a href="mailto:[[wpbb post:acf type='url' name='church_information_staff_email']]"><span class="fas fa-envelope-open">] | |
Here's my closing: | |
[/wpbb-if] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obviously, don't just copy this code. This is just a description of the code I have for another Gist.
Used in a post on https://wpfor.church