WordPress.org

Ready to get started?Download WordPress

Forums

1.0.1 <?php the_category() ?> UL LI tags? (6 posts)

  1. huphtur
    Member
    Posted 10 years ago #

    just upgraded to 1.0.1 which went fine.
    the categories link seems to be hardcoded different?
    i use this:

    <div class="meta">by: <?php the_author() ?> in <?php the_category() ?></div>

    which used to give a result like: by: huphtur in news
    now its including UL and LI tags which breaks my layout
    is there a different category tag or do i need to hack this?

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    Your layout shouldn't be breaking with the simple inclusion of a list. Try changing it.

  3. Nick Momrik
    Member
    Posted 10 years ago #

    huphtur,
    Since the new versions have the ability for multiple categories, it is now output in list format to be semantically correct. You most likely will need to style your CSS. Check the default wp-layout.css to see how it's done there and post back if you have questions.

  4. huphtur
    Member
    Posted 10 years ago #

    mt: i was affraid of that heh. thanks though, i will css it away.

  5. Nick Momrik
    Member
    Posted 10 years ago #

    I just remembered.....You can however pass it a value to use as a seperator and then it won't use UL and LI. This of course is not semantically correct, but is an option. You could do something like:
    <?php the_category(', ') ?>
    and it would put commas in between the categories if you had more than one.

  6. huphtur
    Member
    Posted 10 years ago #

    ah thats neat as well. good stuff mt!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.