Generate Title for Entire Set of Posts
-
Hi,
Thanks so much for the awesome plugin! I’m using WP 3.5.1 with TPG 2.03.00.
I would like to generate a title for an entire set of posts in a particular category or with a certain tag. Here’s an example of the shortcode I’m using on my page now:
[tpg_get_posts cat="Vacation Packages" tag="rome" show_byline="false" numberposts=0 orderby="title" show_excerpt="true" mag_layout="true" thumbnail_size="small" fields="title, content, metadata"] [tpg_get_posts cat="Vacation Packages" tag="venice" show_byline="false" numberposts=0 orderby="title" show_excerpt="true" mag_layout="true" thumbnail_size="small" fields="title, content, metadata"]
If this code generates 3 posts from each tag (“rome” & “venice”), I would like a dynamically generated title to appear above each set of 3 posts like this:
Rome
- Post 1
- Post 2
- Post 3
Venice
- Post 1
- Post 2
- Post 3
This is the code I tried using:
$content .= '<div id="tpg-get-posts" ><div id="vacation-heading"> <div id="vacation-heading-text">'.$this->get_my_tags($post->ID).'</div> </div>';
But it just returned “No Tags” — I’m assuming because that code is supposed to fetch tags associated with individual posts, not the entire shortcode request.
Is there a workaround for this? Something simple I’m missing?
Thanks in advance.
- The topic ‘Generate Title for Entire Set of Posts’ is closed to new replies.