Forums

[resolved] Categories (7 posts)

  1. joannegee
    Member
    Posted 9 months ago #

    In my blog I just cannot seem to modify the widget for categories.
    What I want to end up with is two categories that show up on the front page. However if I turn the category widgets on it takes every single cataogy name and put it in the one box.

    web site is: http://www.the blue juice band.com/pete (I put spaces in here because I did not want this to show up in a google type search - although it still may).

    id: teampete
    pw: peteteam

    I want the first page to have two category boxes instead of one as shown. One box would have 'day to day' and treatment plan' and the other would have the other two. I would then lable each of the two category boxes with another title.

    I hope I was clear. Thank you (anyone) for your solution.

  2. MichaelH
    moderator
    Posted 9 months ago #

    Consider downloading and installing Otto's PHP Code Widget.

    Then use two instances of that Widget, each with your wp_list_categories code. Example:

    <?php wp_list_categories('include=1'); ?>

    Please remember to support our plugin authors by clicking on the Donate button there.

  3. joannegee
    Member
    Posted 9 months ago #

    Thanks - I did download the plug-in and pulled up the editor. However can I get a bit more direction. Yikes. I am new to PHP.

  4. MichaelH
    moderator
    Posted 9 months ago #

    Download the plugin.
    Activate the plugin.
    Visit Appearance->Widgets. Add code widget. Edit code widget and put the <?php wp_list_categories('include=1'); ?> the widget and save it.

    Add another code widget and edit it and put another version of <?php wp_list_categories('include=99'); ?> or whatever in the widget and save it.

  5. joannegee
    Member
    Posted 9 months ago #

    Thanks Mike, I had already gotten that far earlier (download, add, edit) and even added in the one line:
    wp_list_categories('include=1'); ?>

    I just now added the second code widget with this: (feeling real stupid here).
    wp_list_categories('include=99'); ?>

    However am I suppose to change anything or leave those two inserts just as you gave them to me.

    I must be doing something wrong, nothing has changed since I made the change then visited my site.

    I know it must be real easy but I appear to be missing something in understanding this....

    (thanks~)

  6. MichaelH
    moderator
    Posted 9 months ago #

    Sorry, your first widget, for 'day to day' and treatment plan', would have:

    <?php wp_list_categories('include=4,5&title_li=whatever you want'); ?>

    the 2nd code widget, for the other two categories, would have:

    <?php wp_list_categories('include=1,3&title_li=whatever you want as a title'); ?>
  7. joannegee
    Member
    Posted 9 months ago #

    TGreat!
    I am playing around with it now and getting closer. I think all is good to go. Thanks for ALL your help~

Reply

You must log in to post.

About this Topic