Skip to content

Instantly share code, notes, and snippets.

@fieldoffice
Last active July 8, 2018 20:45
Show Gist options
  • Select an option

  • Save fieldoffice/098f831c13a1caa90dd0a5001a016d9d to your computer and use it in GitHub Desktop.

Select an option

Save fieldoffice/098f831c13a1caa90dd0a5001a016d9d to your computer and use it in GitHub Desktop.

Revisions

  1. fieldoffice renamed this gist Jul 8, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. fieldoffice revised this gist Jul 8, 2018. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions wp-nav.php
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,3 @@
    // Removes ul and li markup
    // <nav class="primary-nav">
    // <a href="#">LINK</a>
    // </nav>


    <?php
    $defaults = array(
    'theme_location' => 'primary-menu',
  3. fieldoffice created this gist Jul 8, 2018.
    18 changes: 18 additions & 0 deletions wp-nav.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    // Removes ul and li markup
    // <nav class="primary-nav">
    // <a href="#">LINK</a>
    // </nav>


    <?php
    $defaults = array(
    'theme_location' => 'primary-menu',
    'container' => 'nav',
    'container_class' => 'primary-nav',
    'echo' => false,
    'fallback_cb' => false,
    'items_wrap' => '%3$s',
    'depth' => 0
    );
    echo strip_tags(wp_nav_menu( $defaults ), '<nav><a>');
    ?>