Accordingly to the is_page documentation, supplying the slug as an argument WP can tell me whether the current page is the one represented by the slug. Perhaps I am using the wrong slug? However I did try both the path used in the rewrite argument as well as the bit I consider to be the "slug" or in other words the element used to register the CPT.
Please find below a code snippet to let you understand:
'rewrite' => array( 'slug' => 'faqs/archivio' ) ); register_post_type( 'faqs', $args );
I did this a go using the slug used for a custom post type, but I wasn't able to get this working.
So two questions?
- Is the is_page supposed to work in this case?
- if not, what the best alternative?