<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Combining multiple blogs in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/787642#M33978</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we followed this approach to combine get the latest posts from multiple blogs. But, we have 8 different blogs to combine and there is a hard of limit of 10 calls on "blog_recent_posts()".&lt;/P&gt;&lt;P&gt;Now we have various post lists in addition on the same page and we hit the limit of 10 requests per page, because of this list-combining-approach. Now we are searching for a smarter approach, because on the resulting page we only have 4 blog post lists, but the first list needs the combined posts with 8 calls. That looks pretty unsmart to me, but we did not find another solution right now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone here has an idea how to overcome this limition?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;Elmar&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 09:39:22 GMT</pubDate>
    <dc:creator>nbhs_dev</dc:creator>
    <dc:date>2023-04-28T09:39:22Z</dc:date>
    <item>
      <title>Combining multiple blogs</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/517735#M25806</link>
      <description>&lt;P&gt;Hi I would like to combine two blogs that we have into a single list which displays the most recent first. I would like to set how many are displayed and have pagination similar to what is currently there. The two blogs are currently being controlled&amp;nbsp;via the&amp;nbsp;Settings &amp;gt; website &amp;gt; blogs options in Hubspot as this allows me to control how many are shown etc...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The two blog pages that currently exist&amp;nbsp;are &lt;A href="https://www.webinfinity.com/blog" target="_blank" rel="noopener"&gt;https://www.webinfinity.com/blog&lt;/A&gt; and&amp;nbsp;&lt;A href="https://www.webinfinity.com/newsI" target="_blank" rel="noopener"&gt;https://www.webinfinity.com/newsI&lt;/A&gt; would like them both two appear under a single url&amp;nbsp;&lt;A href="https://www.webinfinity.com/blog." target="_blank" rel="noopener"&gt;https://www.webinfinity.com/blog. &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would then like the option to filter with a dropdown&amp;nbsp;between the blogs and news.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm hoping that it will be easy enough to also change what is shown in the rightbar&amp;nbsp;so that both blogs are included.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you in advance for any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code for the main listing is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="blog-section"&amp;gt;
&amp;lt;div class="blog-listing-wrapper cell-wrapper"&amp;gt;
{# simple_list_page indicates the "blog/all" page, which is a list of links to every blog post #}
&amp;lt;div class="post-listing{% if simple_list_page %}-simple{% endif %}"&amp;gt;
{% if blog_author %}
&amp;lt;div class="hs-author-profile"&amp;gt;
&amp;lt;h2 class="hs-author-name"&amp;gt;{{ blog_author.display_name }}&amp;lt;/h2&amp;gt;
{% if blog_author.avatar %} &amp;lt;div class="hs-author-avatar"&amp;gt; &amp;lt;img width="35 px" src="{{ blog_author.avatar }}" loading="lazy" alt="{{ blog_author.display_name }}"&amp;gt; &amp;lt;/div&amp;gt; {% endif %}
&amp;lt;div class="hs-author-bio"&amp;gt;{{ blog_author.bio }}&amp;lt;/div&amp;gt;
{% if blog_author.has_social_profiles %}
&amp;lt;div class="hs-author-social-section"&amp;gt;
&amp;lt;span class="hs-author-social-label"&amp;gt;Find me on:&amp;lt;/span&amp;gt;
&amp;lt;div class="hs-author-social-links"&amp;gt;
{% if blog_author.facebook %}
&amp;lt;a href="{{ blog_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook fa fa-facebook"&amp;gt;&amp;lt;span class="hs-screen-reader-text"&amp;gt;Facebook&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
{% endif %}
{% if blog_author.linkedin %}
&amp;lt;a href="{{ blog_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin fa fa-linkedin-square"&amp;gt;&amp;lt;span class="hs-screen-reader-text"&amp;gt;Linkedin&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
{% endif %}
{% if blog_author.twitter %}
&amp;lt;a href="{{ blog_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter fa fa-twitter-square"&amp;gt;&amp;lt;span class="hs-screen-reader-text"&amp;gt;Twitter&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
{% endif %}
{% if blog_author.google_plus %}
&amp;lt;a href="{{ blog_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus fa fa-google-plus-square"&amp;gt;&amp;lt;span class="hs-screen-reader-text"&amp;gt;Google Plus&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
{% endif %}
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
{% endif %}
&amp;lt;/div&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;h2 class="hs-author-listing-header"&amp;gt;Recent Posts&amp;lt;/h2&amp;gt;
{% endif %}
{% for content in contents %}
&amp;lt;div class="post-item"&amp;gt;
{% if not simple_list_page %}
{% if content.post_list_summary_featured_image %}
&amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
&amp;lt;a href="{{content.absolute_url}}" title="" class="hs-featured-image-link"&amp;gt;
&amp;lt;img src="{{ content.post_list_summary_featured_image }}" loading="lazy" class="hs-featured-image" alt="{{ content.featured_image_alt_text }}"&amp;gt;
&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
{% endif %}
&amp;lt;div class="post-header clearfix"&amp;gt;
&amp;lt;h2&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
&amp;lt;p id="hubspot-author_data" class="hubspot-editable" data-hubspot-form-id="author_data" data-hubspot-name="Blog Author"&amp;gt;&amp;lt;span class="fa fa-calendar"&amp;gt;&amp;lt;/span&amp;gt;
{{ content.publish_date_localized }} / by
{%if content.blog_post_author %}
&amp;lt;a class="author-link" href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}"&amp;gt;{{ content.blog_post_author.display_name }}&amp;lt;/a&amp;gt;
{% endif %}
{% if content.topic_list %}
posted in
{% for topic in content.topic_list %}
&amp;lt;a class="topic-link" href="{{ group.absolute_url }}/topic/{{ topic.slug }}"&amp;gt;{{ topic.name }}&amp;lt;/a&amp;gt;{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}

&amp;lt;!--comments--&amp;gt;
&amp;lt;span class="custom_listing_comments"&amp;gt;&amp;lt;span class="fa fa-comment"&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;a href="{{content.absolute_url}}#comments-listing"&amp;gt;
{% set comments_number = content.comment_list|length %}
{% if comments_number == 1 %}
{% set comments_label = "Comment" %}
{% else %}
{% set comments_label = "Comments" %}
{% endif %}
{{ comments_number }} {{ comments_label }}&amp;lt;/a&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;/p&amp;gt;

&amp;lt;/div&amp;gt;
&amp;lt;div class="post-body clearfix"&amp;gt;
&amp;lt;!--post summary--&amp;gt;

{{ content.post_list_content|safe }}
&amp;lt;/div&amp;gt;
&amp;lt;a class="more-link" href="{{ content.absolute_url }}"&amp;gt;Read More &amp;lt;/a&amp;gt;&amp;lt;a class="fa fa-chevron-right" href="{{ content.absolute_url }}"&amp;gt;&amp;lt;/a&amp;gt;

&amp;lt;hr &amp;gt;

{% else %}
&amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
{% endif %}
&amp;lt;/div&amp;gt;
{% endfor %}
&amp;lt;/div&amp;gt;

&amp;lt;!--Blog-Pagination--&amp;gt;
{% if not simple_list_page %}
&amp;lt;div class="blog-pagination"&amp;gt;
{% set page_list = [-2, -1, 0, 1, 2] %}
{% if contents.total_page_count - current_page_num == 1 %}{% set offset = -1 %}
{% elif contents.total_page_count - current_page_num == 0 %}{% set offset = -2 %}
{% elif current_page_num == 2 %}{% set offset = 1 %}
{% elif current_page_num == 1 %}{% set offset = 2 %}
{% else %}{% set offset = 0 %}{% endif %}

&amp;lt;div class="blog-pagination-left"&amp;gt;
{% if last_page_num %}&amp;lt;a class="prev-link" href="{{ group.absolute_url }}"&amp;gt;&amp;lt;i class="fa fa-angle-double-left"&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/a&amp;gt;{% endif %}
{% if contents.total_page_count &amp;gt; 5 %}
{% if current_page_num &amp;gt;= 4 %}
&amp;lt;a href="{{ group.absolute_url }}" &amp;gt;1&amp;lt;/a&amp;gt;
&amp;lt;a class="elipses" href="{% if current_page_num &amp;lt;= 5 %}{{ group.absolute_url }}{% else %}{{ blog_page_link(current_page_num - 5) }}{% endif %}"&amp;gt;...&amp;lt;/a&amp;gt;
{% endif %}
{% endif %}
&amp;lt;/div&amp;gt;
&amp;lt;div class="blog-pagination-center"&amp;gt;
{% for page in page_list %}
{% set this_page = current_page_num + page + offset %}
{% if this_page &amp;gt; 0 and this_page &amp;lt;= contents.total_page_count %}
{% if this_page == 1 %}
&amp;lt;a {% if this_page == current_page_num %}class="active"{% endif %} href="{{ group.absolute_url }}"&amp;gt;{{ this_page }}&amp;lt;/a&amp;gt;
{% else %}
&amp;lt;a {% if this_page == current_page_num %}class="active"{% endif %} href="{{ blog_page_link(this_page) }}"&amp;gt;{{ this_page }}&amp;lt;/a&amp;gt;
{% endif %}
{% endif %}
{% endfor %}
&amp;lt;/div&amp;gt;
&amp;lt;div class="blog-pagination-right"&amp;gt;
{% if contents.total_page_count &amp;gt; 5 %}
{% if contents.total_page_count - current_page_num &amp;gt; 2 %}
&amp;lt;a class="elipses" href="{% if contents.total_page_count - current_page_num &amp;lt;= 5 %}{{ contents.total_page_count }}{% else %}{{ blog_page_link(current_page_num + 5) }}{% endif %}"&amp;gt;...&amp;lt;/a&amp;gt;
&amp;lt;a href="{{ blog_page_link(contents.total_page_count) }}"&amp;gt;{{ contents.total_page_count }}&amp;lt;/a&amp;gt;
{% endif %}
{% endif %}
{% if next_page_num %}&amp;lt;a class="next-link" href="{{ blog_page_link(current_page_num + 1) }}"&amp;gt;&amp;lt;i class="fa fa-angle-double-right"&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/a&amp;gt;{% endif %}
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
{% endif %}



&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 23:42:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/517735#M25806</guid>
      <dc:creator>Woodsy</dc:creator>
      <dc:date>2021-10-28T23:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Combining multiple blogs</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/517922#M25816</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/9301"&gt;@Woodsy&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;You can use Isotope - filtering js for the filtring. you have to add HubSpot tags for filters. \n\nRefer to this link:- https://codepen.io/desandro/pen/Ehgij\n&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:829,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;You can use Isotope - filtering js for the filtring. you have to add HubSpot tags for filters. &lt;BR /&gt;&lt;BR /&gt;Refer to this link:- &lt;A href="https://codepen.io/desandro/pen/Ehgij" target="_blank"&gt;https://codepen.io/desandro/pen/Ehgij&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 09:53:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/517922#M25816</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2021-10-29T09:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Combining multiple blogs</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/518148#M25830</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/9301"&gt;@Woodsy&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to get both blogs into one listing you should create a listing containing those two(or more) blogs.&lt;/P&gt;
&lt;P&gt;this can be done like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{# start combining two blogs #}
{% set blog_one_posts = blog_recent_posts('123456789', limit=250) %}
{% set blog_two_posts = blog_recent_posts('987654321', limit=250) %}
{% set all_posts = (blog_one_posts + blog_two_posts) | sort(true, false, 'publish_date')  %} 
{# end combining two blogs #}

{# start listing layout #}
{# start single post layout #}
{% for post in all_posts %}
...
INSERT YOUR POST LAYOUT HERE
...
{% endfor %}
{# end sinle post layout #}
{# end listing layout #}

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to filter them I would recomend to go to build a tag-filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 16:15:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/518148#M25830</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2021-10-29T16:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Combining multiple blogs</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/787642#M33978</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we followed this approach to combine get the latest posts from multiple blogs. But, we have 8 different blogs to combine and there is a hard of limit of 10 calls on "blog_recent_posts()".&lt;/P&gt;&lt;P&gt;Now we have various post lists in addition on the same page and we hit the limit of 10 requests per page, because of this list-combining-approach. Now we are searching for a smarter approach, because on the resulting page we only have 4 blog post lists, but the first list needs the combined posts with 8 calls. That looks pretty unsmart to me, but we did not find another solution right now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone here has an idea how to overcome this limition?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;Elmar&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 09:39:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Combining-multiple-blogs/m-p/787642#M33978</guid>
      <dc:creator>nbhs_dev</dc:creator>
      <dc:date>2023-04-28T09:39:22Z</dc:date>
    </item>
  </channel>
</rss>

