Blog post suppression by author/template/topic

SOLVE
jaala
Member

Hi, I am trying to figure out a way to suppress or keep certain blog posts from displaying in the "recent post" list in our blog. It looks like we can adjust how the content is displayed and what is displayed based on my findings here http://designers.hubspot.com/docs/hubl/blog-content-markup but I am not sure how to do it. Ultimately it doesn't matter what we suppress by (blog post template, author, topic/category) we just need a way to publish posts without them appearing in our blog listings page. What would be the best way to accomplish what we are trying to do?

0 Upvotes
2 Accepted solutions

Accepted Solutions
Tom
Solution
HubSpot Product Team
HubSpot Product Team

Hi @jaala,

 

There is no way to really "surpress" certain blog posts from appearing on your listings page or your most recent posts. 

The only way around this would be to use some custom topic filters instead of the general blog listing template. 

You could then mark posts with custom topics to have them appear within this filter. 

 

For instance you could have a topic for "front page" and you could then have a filter on your main listing template for:

{% set featured_post = blog_recent_topic_posts('{{ group.id }}', 'Front Page', 6 ) %} 

 

This would show 6 items with the front page topic on your homepage. 

 

You could do the same for any topic, such as "recent items". Meaning any posts without these topics won't show up here. 

 

Hope this helps! 

View solution in original post

0 Upvotes
Tom
Solution
HubSpot Product Team
HubSpot Product Team

Hey Jaala, 

 

Using this workaround you can have any number of post topics. The "front page" one for example would just be one topic. You could have one blog post with "front page" "news" "travel" for example. The "front page" tag would add it to your filter that you could use for the front page. You could then have a seperate travel page with this article also on that etc.

 

You can do whatever you like with the template, you can edit your existing template if you wish or clone it and create a new one. It really is down to you. 

View solution in original post

0 Upvotes
5 Replies 5
Tom
Solution
HubSpot Product Team
HubSpot Product Team

Hi @jaala,

 

There is no way to really "surpress" certain blog posts from appearing on your listings page or your most recent posts. 

The only way around this would be to use some custom topic filters instead of the general blog listing template. 

You could then mark posts with custom topics to have them appear within this filter. 

 

For instance you could have a topic for "front page" and you could then have a filter on your main listing template for:

{% set featured_post = blog_recent_topic_posts('{{ group.id }}', 'Front Page', 6 ) %} 

 

This would show 6 items with the front page topic on your homepage. 

 

You could do the same for any topic, such as "recent items". Meaning any posts without these topics won't show up here. 

 

Hope this helps! 

View solution in original post

0 Upvotes
jaala
Member

@Tom Thanks for this. A few questions - in your example are you implying that the posts that we want to appear in our "most recent posts" would all have to share the same topic (in your example "front page") or could we still use multiple topics but include all the topics that we want to apper in the filter? 

Additinally, could we edit our current template in include the changes you suggested or would we have to use a completely different template and make edits to that? 

 

Thank you!

0 Upvotes
Tom
Solution
HubSpot Product Team
HubSpot Product Team

Hey Jaala, 

 

Using this workaround you can have any number of post topics. The "front page" one for example would just be one topic. You could have one blog post with "front page" "news" "travel" for example. The "front page" tag would add it to your filter that you could use for the front page. You could then have a seperate travel page with this article also on that etc.

 

You can do whatever you like with the template, you can edit your existing template if you wish or clone it and create a new one. It really is down to you. 

View solution in original post

0 Upvotes
jaala
Member

Tom,

 

Thanks for clarifying I understand now. If we were to edit our existing default hubspot template (listing template) would you be able to help me figure out where in the code we would need to add your suggestion? 

 

Jaala

0 Upvotes
Tom
HubSpot Product Team
HubSpot Product Team

Where it would go within the template all depends on how you wish to have your blog template. 

It really is all down to you and how you wish to design your blog template.

 

There is a helpful guide on editing blog templates available on our knowledgebase here: https://knowledge.hubspot.com/articles/kcs_article/cos-blog/how-can-i-edit-my-blog-template

 

If you are unfamilar with Hubl and custom designing within HubSpot it might be a good idea to consult a designer to help you build you template. A full index of our design partners are available on our website: 

https://www.hubspot.com/cos-design-consultation

 

Hope this helps! 

0 Upvotes