APIs & Integrations

Not applicable

How do you create a blog post with a date in the past?

Hi,

So I’m currently creating a blog post using /content/api/v2/blog-posts, I’m setting the publish_date to a timestamp that is in the past.

I’m then publishing this blog post using /content/api/v2/blog-posts//publish-action and using ‘action’ as ‘schedule-publish’.

However, the date posted always shows as todays date. How can I change this?

Thanks!
Toby

0 Upvotes
7 Replies 7
Not applicable

How do you create a blog post with a date in the past?

I ran into the same problem. If you specify the correct time, you will succeed if you use the function 'Update the blog post' or page. After such an update, time changes.

BkT
Member

How do you create a blog post with a date in the past?

What do you mean "specify the correct time"? It's already in the past. I am having the same issue. My blog post won't back date 

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

How do you create a blog post with a date in the past?

@BkT , could you describe how you are approaching the problem in detail so we can see where the error might be?

0 Upvotes
BkT
Member

How do you create a blog post with a date in the past?

I figured out the issue. How? I'm not really sure honetly.
However I do have a queston,  if I have a feature story, and the date of the feature story isn't the latest story as far as date is concerned, it won't show in the featured section, and the regular story with no image, but has the newest date will show. Why does it do this? Can it be fixed? There are many instances where the newest story won't be a featured story and we want to have it show in the list, but not in the featured section

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

How do you create a blog post with a date in the past?

A: glad you figured it out.  Not understanding why is par for the course for me 😀

B:  your follow up question is hard to answer without knowing the logic of your listing page code. 

Historically, I have used a "featured" tag to indicate that an item is featured and loop through them.  Can you let us know what your method of indicating what is featured is?

@stefen is about 3000x smarter than I am and will give a better answer.  I promise

0 Upvotes
BkT
Member

How do you create a blog post with a date in the past?

@dennisedson Creating a new page, after selecting your template, there are tabs at the top. Under settings it asked to add an image if its a featured post. Let's say I add an image, usually the feature story would post above everything else, but if I backdate the feature, and still keep it as a feature, then I create another post with the newest date, the newest story will trump the feature story in its location. It seems like it is all based on the date and not the type of story it is or image.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

How do you create a blog post with a date in the past?

@BkT ,

Just to make sure we are on the same page, it seems like you are doing all of this from the UI and not using the API.  Is that correct?

If so, I would recommend creating a new question in the CMS board.  You will get a lot of help on it there!

0 Upvotes