To disable some item URLs in the Portfolio Page (Grid Layout), you can follow these steps:
#1. Find the URL of Portfolio Items
In my example, we will have some example item URL
- /collaborations/allbirds
- /collaborations/fresh
To find the URL, you can hover on each item > Click 3 dots > Settings > Then look at URL Slug

Or just open the portfolio item page and look at the Browser Address Bar.

#2. Use this code to Code Injection > Footer (or Portfolio Page Header Code Injection)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
$('a.grid-item[href="/collaborations/allbirds"]').removeAttr('href');
$('a.grid-item[href="/collaborations/fresh"]').removeAttr('href');
})
</script>
