SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Oct 2008
    Location
    Virtual World is my location
    Posts
    311
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Question Display posts grouped by category and author

    I am trying to do Group by Category and Author and display posts in Wordpress but have been unsuccessful. Single grouping works.
    Like I can either group by Author or Category but not both

    Here is what I am able to achieve

    Category Name 1
    + Post 1
    + Post 2
    + Post 3

    Category Name 2
    + Post 4
    + Post 5
    + Post 6

    Similarly I am able to do this
    Author Name 1
    + Post 1
    + Post 3
    + Post 5

    Author Name 2
    + Post 2
    + Post 4
    + Post 6
    But I need to do this

    Category Name 1
    + Author Name 1
    + Post 1
    + Post 3

    + Author Name 2
    + Post 2

    Category Name 2
    + Author Name 1
    + Post 5

    + Author Name 2
    + Post 4
    + Post 6

    Any help is highly appreciated.
    RecipesNext.com - recipes, kitchen queries, videos & more...
    BargainNext.com - coupons / deals / bargains / offers & more...

  2. #2
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Please post your working code and your attempt at the two tier.
    Ryan B | My Blog | Twitter

  3. #3
    SitePoint Addict
    Join Date
    Oct 2008
    Location
    Virtual World is my location
    Posts
    311
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    nevermind figured out. I was not adding a group by author id to my query thats why it was not working.

    we basically need to add a group by author to the query
    RecipesNext.com - recipes, kitchen queries, videos & more...
    BargainNext.com - coupons / deals / bargains / offers & more...


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •