Plugin Directory

Changeset 760430


Ignore:
Timestamp:
08/21/2013 11:15:46 PM (13 years ago)
Author:
Faison
Message:

Added an example of how to use this plugin in the FAQ

Location:
advanced-custom-fields-nav-menu-field
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • advanced-custom-fields-nav-menu-field/tags/1.1.2/readme.txt

    r760422 r760430  
    5555== Frequently Asked Questions ==
    5656
     57= Can you show a quick example of how to use this? =
     58
     59Sure can!
     60
     611.  Create a new field group
     622.  Add a Nav Menu and set the Field Label to `Side Menu` (this will cause the Field Name to be `side_menu`)
     633.  Set the Nav Menu's Return Value to `Nav Menu HTML`
     644.  Set the Location Rules to Show if "Post Type" "is equal to" "Page"
     655.  Save the Field Group
     666.  Now in your themes sidebar.php, put the following code before or after any of the div's with class="widget-area"
     67`
     68<?php if( get_field( 'side_menu' ) ) : ?>
     69    <div class="widget-area">
     70        <?php the_field( 'side_menu' ); ?>
     71    </div>
     72<?php endif; ?>
     73`
     74Finally, create or edit a page, select a menu in the Side Menu field, and view the page to see that menu in the sidebar!
     75
    5776= Will you make this plugin compatible with Advanced Custom Fields v3? =
    5877
  • advanced-custom-fields-nav-menu-field/trunk/readme.txt

    r760422 r760430  
    5555== Frequently Asked Questions ==
    5656
     57= Can you show a quick example of how to use this? =
     58
     59Sure can!
     60
     611.  Create a new field group
     622.  Add a Nav Menu and set the Field Label to `Side Menu` (this will cause the Field Name to be `side_menu`)
     633.  Set the Nav Menu's Return Value to `Nav Menu HTML`
     644.  Set the Location Rules to Show if "Post Type" "is equal to" "Page"
     655.  Save the Field Group
     666.  Now in your themes sidebar.php, put the following code before or after any of the div's with class="widget-area"
     67`
     68<?php if( get_field( 'side_menu' ) ) : ?>
     69    <div class="widget-area">
     70        <?php the_field( 'side_menu' ); ?>
     71    </div>
     72<?php endif; ?>
     73`
     74Finally, create or edit a page, select a menu in the Side Menu field, and view the page to see that menu in the sidebar!
     75
    5776= Will you make this plugin compatible with Advanced Custom Fields v3? =
    5877
Note: See TracChangeset for help on using the changeset viewer.