Get category_id from section page

Answered

2 Comments

  • Vladan Jovic
    Community Moderator

    Hi Rian! I think that the only way to achieve that is using of JS.

    <script>
    var catId = $(".breadcrumbs li:nth-child(2) a").attr("href").match(/[0-9]+/);
    </script>

    Hope this helps!

    1
  • David Bjorgen

    Vladan, very helpful code for my project. Thanks!

    0

Post is closed for comments.

Powered by Zendesk