post type single posts think they are attachments
-
I have a custom post type ‘cwslis_news’ which holds news stories for my site. The read more links where loading the appropriate single.php but ‘something’ has changed and now they loading the index.php.
When I dig into the base code and look at the value of the post query contains:
[request] => SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_name = ‘test’ AND wp_posts.post_type = ‘attachment’ ORDER BY wp_posts.post_date DESC
where the name is right but the post_type should be ‘cwslis_news’ not ‘attachment’.
This is the same for all my old and new post under cwslis_news. All the records in the posts table have the post_type ‘cwslis_news’ so presumably something somwhere else has decided that pages on /wordpress/cwslis_news/[xxxx] are all type = attachment not type = cwslis_news
Any ideas how I can change this?
- The topic ‘post type single posts think they are attachments’ is closed to new replies.