Custom post type and permalinks

Hi all!
I have an issue with my plugin:
I want to declare a custom post-type “flip_pong”, in a class “flippong”.
Untill here, everything is ok. The issue happens when I want to see a post of this CTP with pretty permalinks: 404 error !

I know I have to call flush_rewrite_rules() to rewrite the permalinks structure. So I call it at the plugin activation. Everything seems to work, except that I still have a 404 when I want to see a post.

You need to use the array('flippong','create_flippong_post_types' ) form of referencing your class method for add_action() and anywhere you pass a function name to be used as a callback.

You should call the flush_rewrite_rule() function from your own activation and deactivation callbacks instead of hooking it separately. As it is now, you cannot be sure it will be called in the right sequence.

Er, yeah, that’s what you did. I must be blind! How embarrassing, sorry about that. I’ve looked over your code again, carefully this time, and see nothing wrong. Not reassuring since I’ve been proven blind :/

You could try toggling the permalink settings off and on in your admin panel to see if the issue is the activation hook or something else, maybe something in .htaccess taking action before the WP section? Sorry, I’m not coming up with any useful ideas.