Drop down creation

Hi,

My client want to display post list & post filter by tag within dropdown.How could I integrate such layout into HS blog page. Please let me know ASAP.

I attached the screenshot like what they want, please see the attachment

@TRooInbound do you think this would be possible using Hub DB?

Hi @amitr,

You can use below code to create drop down option with blog category/tags.

<select id="blog-topics">
	<option>By Category</option>
	{% for topic in contents_topics %}
		<option value="{{ group.absolute_url }}/topic/{{ topic.slug }}">{{ topic.name }}</option>
	{% endfor %}
</select>

We hope it resolve your issue.

If our suggestion works for you please mark it as a solution to help the community.

Thanks @TRooInbound for the advice.

I’ve managed to show this dropdown based on Tags.

However when I clicked on an item on the dropdown, it does not filter out those tagged post. Any ideas please? Thanks!

Hey @stephenong

So what you’ll have to do is reload the page with the selected tag in a query string parameter.

If you haven’t seen the Real Estste Listing tutorial check it out! Pay attention to steps 3 and 4 as they contain the logic for you business case.