• I have this iniside my template

    <div class="recent">
          <?php get_archives('postbypost', 30); ?>
          </div>

    its output is this below and adds automatically a li tag… how can I remove the li tag?

    <li><a rel="nofollow" href='http://url.com/link'>Link1</a></li>
    <li><a rel="nofollow" href='http://url.com/link'>Link2</a></li>
    <li><a rel="nofollow" href='http://url.com/link'>Link3</a></li>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter sazuka

    (@sazuka)

    Is it some global code which auto ads a li tag or is it bound to the custom template`?

    http://codex.wordpress.org/Function_Reference/get_archives

    the article has some examples

    as is says, get_archives() is depracated, so while you are working on your template files, replace it with the newer function wp_get_archives()

    http://codex.wordpress.org/Template_Tags/wp_get_archives

    (the codex is the documentation of wordpress; any time you come across some questions about wordpress functions or template tags, simply use the web search – for instance ‘get_archive() wordpress codex’ – this should give you at least one link to the right chapter of the codex, where you can read up on the functions you have trouble with.)

    if you have tried your interpretation of the docu and are stuck, you can still come back and ask here in the forum, describing what you have tried so far, and where it did not work….

    Thread Starter sazuka

    (@sazuka)

    I am kinda stuck with <?php wp_get_archives('type=postbypost&limit=20&format=custom'); ?>

    It doesnt make any br tags inbetween.. It simply lines them up…

    it says in the docu, if you use format=custom, you need to use the before and after parameter as well.

    try, for instance:

    <?php wp_get_archives('type=postbypost&limit=20&format=custom&after=<br/>'); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Li Tag’ is closed to new replies.