Help with blog_recent_author_posts

Hi,

I have had this piece of code on our website for some time but only recently I have noticed that it has stopped working fully. I have pasted the full code below with a link to the page it’s on (at the bottom “Other Articles by…”).

Everything seems to work except for the following:

  • rec_post.url
  • rec_post.blog_post_author.display_name

I want to return the name of the author, as well as the URL for the blog. I have added |pprint at the end and they just return as null.

This code should pull in the most recent blog posts from the author of the current page. This works fine apart from the URL and the author name.

I’ve also tried:

  • rec_post.absolute_url
  • rec_post.blog_post_author.name

{% set rec_posts = blog_recent_author_posts(‘default’, content.blog_post_author.slug, 4) %}
{% for rec_post in rec_posts %}

<div class=“item text-left shadow-on-hover”>
<div>
<a class=“no-underline” href=“{{ rec_post.url }}”><div class=“cover-bg lazy” style=“background-image: url({{ rec_post.featured_image }}); min-height:200px;”></div></a>
<div class=“add-padding”>
<p><a class=“nothing” href=“{{ rec_post.url }}”>{{ rec_post.title }}</a></p>

<p><strong>{{ rec_post.blog_post_author.display_name }} | {{ rec_post.publishDate|datetimeformat(‘%d’)}} {{ rec_post.publishDate|datetimeformat(‘%b’)}} {{ rec_post.publishDate|datetimeformat(‘%Y’)}}</strong></p>
<p>{{ rec_post.meta_description}}</p>

</div>
</div>
<div class=“add-padding”>
<p style=“padding:0;”><a href=“{{ rec_post.url }}”>Read blog post ></a></p>
</div>
</div>
{% endfor %}

Hey @pm8rsh88

Thank you for the information provided. I’ll tag a few experts.

Hey @Kevin-C @SandyG1 @John what would you advise in this case?

Thanks & Happy Friday!

Sharon

It was a hubspot side Issue. now it is fixed

Thank you