WordPress.org

Ready to get started?Download WordPress

Forums

List Category Titles Only Not As Links (2 posts)

  1. WebTechGlobal
    Member
    Posted 5 years ago #

    Hey, anyone who provide a solution will get their name in credits for this new plugin.

    I want to create a drop down menu of the categories in a blog for a new plugin I'm developing. Every function seems to always return links and I just need the TITLE on its own.

    Anyone have any ideas, thanks for any help. Here is where I'm at right now...

    <select name="test" size="1">
    <option value="
    <?php wp_list_categories('show_option_all=style=nonetitle_li=');?>">
    <?php $test = wp_list_categories('echo=0&show_option_all=style=none&title_li=');

    foreach(($test) as $category) {
    echo $category->cat_name . ' ';
    }
    ?></option>

  2. esmi
    Forum Moderator
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic