• Resolved mcaf123

    (@mcaf123)


    Hi,
    I came across this plugin through wpbeginner. I would like to show all my posts in alphabetical order based on title, but would also like to show the posts under each tag or category as a header. For example:
    > Category 1
    >> Post A
    >> Post B
    > Category 2
    >> Post A
    >> Post B

    Is this at all possible?
    TIA!

    • This topic was modified 7 years, 5 months ago by mcaf123.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Unfortunately no, it cannot break down the listings into separate category listings. But you can add a custom header to results:

    [display-posts category=”category-1″ orderby=”title” order=”ASC” posts_per_page=”999″ title=”Category 1″]

    [display-posts category=”category-2″ orderby=”title” order=”ASC” posts_per_page=”999″ title=”Category 2″]

    The title will only appear if the shortcode has results, so if a category has no results then no title will appear.

    Thread Starter mcaf123

    (@mcaf123)

    Thanks Bill, this works perfectly for my needs! I really like the clean look your code gives to the page – much nicer than me formatting the headers myself. Appreciate the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display all posts by category and in alphabetical order with category headings’ is closed to new replies.