WordPress.org

Ready to get started?Download WordPress

Forums

Department - Categorie (1 post)

  1. thunderboy
    Member
    Posted 5 years ago #

    Friends, see if I can help.

    In my intranet, developed in WordPress will have an area on the homepage where we have stories that are published also in other categories, the staff published a story in the category Human Resources, and will make the list of category, which will also be displayed on the homepage (mural class) until ai OK, but I wish they were shown as:

    Mural de Notícias === ==
    -----------------------------------------

    Department: Name of department

    - Title 01 news
    blah, blah, blah, blah ......

    - Title 02 news
    blah, blah, blah, blah ......
    -----------------------------------------

    Department: Name of department 2

    - Title 01 news
    blah, blah, blah, blah ......

    - Title 02 news
    blah, blah, blah, blah ......

    The problem in this loop that appears the name of the sector also, how? With loop for?

    To view the posts in each category I:

    $news = new WP_Query ();
    $news-> query ('showposts = 4 & cat = 4');
    while ($ news-> have_posts ()): $ news-> the_post ();
    ....
    ....
    ....
    endwhile

Topic Closed

This topic has been closed to new replies.

About this Topic