Remove blog list page but not not delete the entire blog

faizan_abid
Visitor
1 0 1

Hi there!

We have a blog in our site with several articles. We wish to show the articles in that blog but not have a link to see all the articles under the blog (when visiting url/blog-handle). Is there a way to achieve this?

I am aware that we can just not show the blog link under navigation but we don't wish for users to visit the blog handle link and see all those articles.

Replies 2 (2)

KetanKumar
Shopify Partner
36902 3640 11985

@faizan_abid 

can you please share store url so i will check and guide 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

LitExtension
Shopify Partner
4860 1002 1145

Hi @faizan_abid,

Please follow these steps:

- Step 1: Go to Online store > Themes > Actions > Edit code.

- Step 2: Go to Templates > blog.liquid and remove all code: https://i.imgur.com/rcedomC.png

- Step 3: Add code: https://i.imgur.com/gvZulyQ.png

<script type="text/javascript">
window.location.href= '{{ routes.root_url }}';
</script>

Then when go to the blog page, it will automatically return the home page.

If you are only setting for a single blog, you can change the code: https://i.imgur.com/vqXpkAA.png

{% if blog.handle == 'blog-handle' %}
<script type="text/javascript">
window.location.href= '{{ routes.root_url }}';
</script>
{% else %}
{% section 'blog-template' %}
{% endif %}

Hope it is clear to you.

If my answer can help you solve your issue, please kindly mark it as a solution. Thank you and good luck.

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify