• rubbed

    (@rubbed)


    I have this code

    <nav>
     <ul class="mainmenu">
      <li></li>
      <li></li>
      <li></li>
     </ul>
    </nav>

    And just replaced it with wordpress 3 menu so it is now:

    <nav>
    <?php wp_nav_menu(array('menu' => 'Main Nav Menu')); ?>
    </nav>

    My UL class “mainmenu” had some css to position the navigation list in a certain way etc.

    How do I apply this same css to the php command, or will I have to wrap it in a div within the nav tag with those same settings?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter rubbed

    (@rubbed)

    Anyone? How do I edit the css of things like:
    <?php edit_post_link(‘Edit this entry’,”,’.’); ?>

    ??

    Michael

    (@alchymyth)

    for your menu problem: look through all the parameters of wp_nav_menu() https://codex.www.ads-software.com/Function_Reference/wp_nav_menu
    if you can’t change the output, change the css.

    How do I edit the css of things like:
    <?php edit_post_link(‘Edit this entry’,”,’.’); ?>

    you could wrap this code with a html tag, for instance a span with a css class;
    or use the css class which is output by the function:
    .post-edit-link

    try to work with a tool such as Firebug https://getfirebug.com/ to investigate the css.

    Thread Starter rubbed

    (@rubbed)

    Thanks.

    is there a similar thing for chrome?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding css to a php command? ie. navigation menu’ is closed to new replies.