How To Remove Specific Pages From Custom Post Type Archive

This code enables you to remove one or more pages from your custom post type archive page loop.

Simply add the code to your child themes functions file and replace the post I.D in the following code with your own post I.D or comma separated post I.D’s for the pages you want to exclude from the archive.

You’ll also need to swap out the name of the CPT (portfolio) with your own.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.