Optimizing a Blog with Categories via Tags

Optimizing a Blog with Categories via Tags

JuliaP
Visitor
2 0 0

I am working on updating our site's blog homepage for SEO and UX purposes within the theme editor. I duplicated our default blog page and am adding a handful of sections above the standard blog post section detailing our blog's categories, which are determined by blog post tags.

 

Right now, the URL structure to view all blog posts within a tagged category is "website.com/blogs/articles/tagged/tag-name". Since I am trying to put the "website.com/blogs/articles" onto a new theme template, the category URLs now display all of the new category sections above the blog post list that updates to display blog posts of the tagged category.

 

Is there a way to natively put the category URLs onto a different theme template that only displays blog posts within that category? I want customers to see the updated blog homepage, then click on a category, and be only shown a list of blog posts from that category.

 

I see the option to use Blogs as the categories instead of tags, however, we would like certain blog posts to live under multiple categories and I don't see how this is possible to do with blogs as categories.


Thanks!

Replies 3 (3)

gauravshukla
Shopify Partner
47 4 10

You could always build a custom page which takes the category from query parameters and filters the blog posts by category. then link this page where ever you want the user to view blogs from a particular category.

 

This will be like your custom blog listing page.

Founder at Farziengineer. Whatsapp on +91-9044747946 for quick help
JuliaP
Visitor
2 0 0

Thanks for the response! I'm thinking that this is the only way to achieve what we are trying to do. However, I haven't figured out how to source the tagged posts and put them on a new custom page yet. Any ideas?

gauravshukla
Shopify Partner
47 4 10

There's a blog object in liquid which can be used to fetch the blog posts. Here's an example on how to use it. https://community.shopify.com/c/technical-q-a/how-to-display-all-blogs-with-different-categories-in-...

You can contact me if you want someone to code it for you.

Founder at Farziengineer. Whatsapp on +91-9044747946 for quick help