I'm attempting to display:
- Linked Category Titles
- Category Descriptions (trimmed to custom length)
- Category "Readmore Styled Link
- A lists of Post Titles WITHIN that category, linking to the posts
I've accomplished tasks 1-3 with a Foreach loop, but I can't seem to display posts titles WITHIN each category through methods I've used in the past. The main thing is that I can't figure out how to run get_posts(); or a function like it with a variable in the $args array.
I feel this really needs to be done with a foreach loop, as I'm working with 20+ Categories. I've tried mixing / matching with a 3rd party shortcode plug-in, but due to "order of wp operations" that idea failed as well :( Any help would be EXTREMELY appreciated as I've been spinning my wheels for the past 3-4 hours.
Source Code → http://pastebin.com/Mm9u27dF
Code Output:
<p class="topic-link-heading"><a href="http://localhost:81/wordpress/?cat=3" id="topic-link">Understanding Democratic Governance and Market Economy</a></p><p class="topic-list">There is an ongoing debate in academic circles and among practitioners on the linkages between democratic governance and market economies. It has intensified in light of transitions taking place after the fall of the Berlin Wall. Amidst expectations that all … <a href="http://localhost:81/wordpress/?cat=3" > Topic Overview →</a></p>3
Please Note
The "3" is only being displayed to show that the category ID variable is outputting correctly