# Merging blog lists

**URL:** <https://community.hubspot.com/t/merging-blog-lists/10835>\
**Category:** CMS Development\
**Created:** [November 6, 2018, 1:03pm UTC](https://community.hubspot.com/t/merging-blog-lists/10835 "2018-11-06T13:03:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spsangeeta](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/spsangeeta/32/35493_2.png) [@spsangeeta](https://community.hubspot.com/u/spsangeeta)\
**Post date:** [November 6, 2018, 1:03pm UTC](https://community.hubspot.com/t/merging-blog-lists/10835/1 "2018-11-06T13:03:29Z")

</div>

Hi,

I have different blog templates for English and Arabic. I want to create a template which shows a list of blogs from both of English and Arabic blog pages sorted by date.

I tried to make changes in the post listing in the template, as shown on this page:

> **[Blog templates - HubSpot docs](https://developers.hubspot.com/docs/cms/start-building/building-blocks/templates/blog)**
>
> Blog listing and blog post templates can be used to customize the appearance of a site's blog.

Below is my page link:

[https://www.sabaconsultants.com/all-blogs](https://www.sabaconsultants.com/all-blogs)

The page was created but the blog list doesn’t show up.

I want to merge the blog list of the 2 pages below:

> **[Our Blogs - Saba Consultants](https://sabaconsultants.com/blog/)**

[https://www.sabaconsultants.com/blog-ar](https://www.sabaconsultants.com/blog-ar)

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![ChadP](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chadp/32/37777_2.png) [@ChadP](https://community.hubspot.com/u/ChadP)\
**Post date:** [November 6, 2018, 5:32pm UTC](https://community.hubspot.com/t/merging-blog-lists/10835/2 "2018-11-06T17:32:00Z")

</div>

Is it possible you post the code you are using to combine the two lists?

---

<div class="post-metadata">

**Author:** ![spsangeeta](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/spsangeeta/32/35493_2.png) [@spsangeeta](https://community.hubspot.com/u/spsangeeta)\
**Post date:** [November 7, 2018, 7:00am UTC](https://community.hubspot.com/t/merging-blog-lists/10835/3 "2018-11-07T07:00:00Z")

</div>

{% set blog\_one\_posts = blog\_recent\_posts(‘5269069498’, limit=5) %} \<!-- sets a variable for a the 5 most recent posts of my default COS blog --\>  
{% set blog\_two\_posts = blog\_recent\_posts(‘5213662779’, limit=5) %} \<!-- sets a variable for a the 5 most recent posts of my blog id 47082700. You can find the blog id in the URL of the blog dashboard for a particular blog--\>  
{% set all\_posts = (blog\_one\_posts + blog\_two\_posts) | sort(true, false, ‘publish\_date’) %} \<!-- combines the two variables into a single variable and sorts them by publish date. Please note the sort filter requires all three parameters --\>  
{% for post in all\_posts %} \<!-- loop through posts in custom all posts variable --\>  
\<div class=“post-item”\>  
{% if not simple\_list\_page %}  
\<div class=“post-header”\>  
\<h2\>\<a href=“{{post.absolute\_url}}”\>{{ post.name }}\</a\>\</h2\>  
\<div id=“hubspot-author\_data” class=“hubspot-editable” data-hubspot-form-id=“author\_data” data-hubspot-name=“Blog Author”\>  
Posted by  
{%if post.blog\_post\_author %}  
\<a class=“author-link” href=" {{ post.parent\_blog.absolute\_url }}/author/{{ post.blog\_post\_author.slug }}“\>{{ post.blog\_post\_author.display\_name }}\</a\> on {{ post.publish\_date\_localized }}  
{% endif %}  
\</div\>  
{% blog\_social\_sharing “blog\_social\_sharing” overrideable=False, label=‘Blog Social Sharing’ %}  
\</div\>  
\<div class=“post-body clearfix”\>  
\<!--post summary--\>  
{% if post.post\_list\_summary\_featured\_image %}  
\<div class=“hs-featured-image-wrapper”\>  
\<a href=”{{post.absolute\_url}}" title=“” class=“hs-featured-image-link”\>  
\<img src=“{{ post.post\_list\_summary\_featured\_image }}” class=“hs-featured-image”\>  
\</a\>  
\</div\>  
{% endif %}  
{{ post.post\_list\_content|safe }}  
\</div\>  
{% if content\_group.show\_summary\_in\_listing %}  
\<a class=“more-link” href=“{{ post.absolute\_url }}”\>Read More\</a\>  
{% endif %}  
\<div class=“custom\_listing\_comments”\>  
{% set comments\_number = post.comment\_list|length %}  
{% set comments\_label = “Comment” if comments\_number == 1 else “Comments” %}  
{{ comments\_number }} {{ comments\_label }} \<a href=“{{post.absolute\_url}}#comments-listing”\>Click here to read/write comments\</a\>  
\</div\>  
{% if post.topic\_list %}  
\<p id=“hubspot-topic\_data”\> Topics:  
{% for topic in post.topic\_list %}  
\<a class=“topic-link” href=" {{ post.parent\_blog.absolute\_url }}/topic/{{ topic.slug }}\</a\>{% if not loop.last %},{% endif %}  
{% endfor %}  
\</p\>  
{% endif %}  
{% else %}  
\<h2 class=“post-listing-simple”\>\<a href=“{{post.absolute\_url}}”\>{{ post.name }}\</a\>\</h2\>  
{% endif %}  
\</div\>  
{% endfor %}

---

<div class="post-metadata">

**Author:** ![valerajoey](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/valerajoey/32/35482_2.png) [@valerajoey](https://community.hubspot.com/u/valerajoey)\
**Post date:** [November 8, 2018, 7:29am UTC](https://community.hubspot.com/t/merging-blog-lists/10835/4 "2018-11-08T07:29:37Z")

</div>

you can have some idea here [https://community.hubspot.com/t5/Content-Design-Questions/Combine-multiple-blogs-in-Related-Posts/m-p/214859#M9430](https://community.hubspot.com/t5/Content-Design-Questions/Combine-multiple-blogs-in-Related-Posts/m-p/214859#M9430) and just sort it out by publish date  
best of luck  
joey
