SELECT `main_table`.*, (CASE WHEN `post_type` = 'post' THEN (CONCAT(post_name, '/')) WHEN `post_type` = 'page' THEN (CONCAT('%postnames%', '/')) END) AS `permalink` FROM `wp_posts` AS `main_table` WHERE (`main_table`.`post_type` IN('post', 'page')) ORDER BY main_table.menu_order ASC, main_table.post_date DESC
An error has happened during application run. See exception log for details.