Last active
August 29, 2015 14:24
-
-
Save jamieschmid/8c72e7aeef32c70ec1e5 to your computer and use it in GitHub Desktop.
Advanced Custom Fields gists
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
| if( function_exists('acf_add_options_page') ) { | |
| $page = array( | |
| 'page_title' => 'Header', | |
| 'menu_title' => 'Header', | |
| 'menu_slug' => 'header', | |
| 'capability' => 'edit_posts', | |
| 'redirect' => false, | |
| 'position' => '3.3' | |
| ); | |
| acf_add_options_page( $page ); | |
| } |
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
| <?php the_field('field_name', 123); ?> |
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
| add_action( 'wp_enqueue_scripts', 'jk_masonry' ); | |
| function jk_masonry() { | |
| wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) ); | |
| } |
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
| <?php if( have_rows('repeater', 123) ): ?> | |
| <ul> | |
| <?php while( have_rows('repeater', 123) ): the_row(); ?> | |
| <li><?php the_sub_field('title'); ?></li> | |
| <?php endwhile; ?> | |
| </ul> | |
| <?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment