WordPress.org

Ready to get started?Download WordPress

Forums

Display Category Description on Mouseover? (8 posts)

  1. pezastic
    Member
    Posted 7 years ago #

    I asked this two years ago, but didn't get a viable answer. So, I was wondering if anything had changed. I now have over 100 categories and entered descriptions for all of them. I would like a way to display those descriptions to users when they mouseover the category titles on the sidebar. Is this possible? If so, how?

  2. drmike
    Member
    Posted 7 years ago #

    Template_Tags/wp_list_categories

    Take a look at the use_desc_for_title Parameter

  3. pezastic
    Member
    Posted 7 years ago #

    How did I miss that? Thanks a bunch!

  4. drmike
    Member
    Posted 7 years ago #

    Not a problem. :)

  5. Zuperfly
    Member
    Posted 7 years ago #

    Is it also possible to access and display the category description somewhere 'outside' the wp_list_categories parameter?

  6. Zuperfly
    Member
    Posted 7 years ago #

    Okay, it's possible with <?php echo category_description(); ?>

    But is it also possible to get an automatic category listing like this:

    • Category title
      Category description

    Do I have to use a "for each loop" ? Sorry, I'm not so firm with PHP..

  7. drew3000
    Member
    Posted 7 years ago #

    I haven't been able to make <?php echo category_description(); ?> no matter where I put it. I haven't been able to get it to work yet. Only if I put a number in the parenthesis, like <?php echo category_description(3); ?> or something. But then it's a fixed, sticky post that will always display that category description, no matter what.

    How can I simply display the correct, corresponding category description?

    Seems like there should be a strip of code to do this, but i'm missing it.

  8. drew3000
    Member
    Posted 7 years ago #

    Ba-dump-bump.

    Anyone?

  9. drew3000
    Member
    Posted 7 years ago #

    Ba-dump-bump.

    Anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic