Ok so I managed to figure out why the filter wasn’t working as expected.
To clarify the error.
As you can see from the above attached images, there is a portfolio sections with a left sidebar filter area.
All the filter categories show in the sidebar correctly but for some reason one of the categories wasn’t showing up when you clicked on it.
My first thought was to try delete categories and rename them with a different slug, and the same for the portfolio pages. This didn’t help as it only changed the order of which category wasn’t showing up when you clicked on it.
I fixed this issue by changing the setting posts per page, you can navigate there by:
Appearance -> Customize -> Portfolio Options -> General
There is a input box where you can specify Posts per page.
By default this was set to 12 posts per page. Change this so something like 50!
My guess is that in the template code it was looping through the all the posts, in this case portfolio posts, and instead of stopping at post number 12, the counter skipped number 13 then reset back to 0 -> then continued counting and displaying the portfolio posts correctly.
Hope this makes sense and helps someone struggling with this issue.