Creating an email to pull tagged blog posts for a workflow

Highlighted
Regular Contributor

Hello! We are creating an email nurture and want to pull in new blog posts with a specific tag for one of these emails. I have a blog email set up, but for the life of me cannot get it to pull posts by tags instead of recency withot losing all formatting.

 

I can't use an RSS email, as these can't be saved for automation. 

 

Here's the code I have. The tag is "technical resources", and we only need to pull in this one tag. Can anyone help? Your assistance is MUCH appreciated. 

 

{% set rec_posts = blog_recent_posts('4580349396', 2) %}
{% for rec_post in rec_posts %}
<div class="post-box">
<img style="width:100% !important; max-width:100% !important; height:auto !important " src="{{ rec_post.featured_image }}" alt="post-image">
<br>
<br>
<div class="post-content" style="padding-top:15px !important; padding-bottom:25px !important; padding:15px 20px 25px !important; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif">
<h2 style="font-family:Arial, Helvetica, sans-serif !important; width:100% !important; font-weight:700 !important; color:#555555 !important; line-height:24px !important; font-size:22px !important; margin:0 !important; padding:5px 0 15px !important;" class="post-title">{{ rec_post.name }}</h2>
<div class="post-cbyline" style="font-family: Arial, Helvetica, sans-serif; color:#555555 !important">
by <a class="author-link" style="text-decoration:none; color:#555555;" href="{{ group.absolute_url }}/author/{{ rec_post.blog_post_author.slug }}">{{ rec_post.blog_post_author.display_name }}</a>, {{ rec_post.publish_date|datetimeformat('%m/%e/%Y') }}
</div>
<p> {{ rec_post.post_list_content }} </p>
<div class="post-link" style="text-align:center">
<a class="more-link" style=" font-family: Arial, Helvetica, sans-serif !important; background:#0066ff !important; min-width:148px !important; height:40px !important; border-radius:5px !important; line-height:40px !important; text-align:center !important; color:#fff !important; text-transform:uppercase !important; font-weight:700 !important; margin-top:20px !important; display:inline-block !important; text-decoration:none !important; float:none !important; margin-bottom:0 !important; " href="{{rec_post.absolute_url }}"><span style="color:#fff !important;" >Read More</span></a>
</div>

</div>
</div>
{% endfor %}

 

Reply
0 Upvotes
1 Reply 1
Community Manager

Hi @egleeson,

 

It looks like you got the answer for this inquiry in this thread.

 

If you're still having trouble, let us know. 

 

Thanks,

Jenny


Did my post help answer your query? Help the Community by marking it as a solution
Reply
0 Upvotes