WP SITES

3095 Coded Tutorials & 297 Plugins

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.

Was this helpful?

Yes
No
Thanks for your feedback!

Leave a Reply