How to create additional rendering for custom post types?

You need to use add_rewrite_tag and add_rewrite_rule functions to first register your custom URL handlers. Something like add_rewrite_tag( ‘%custom_render%’, ‘true’ ); add_rewrite_rule( ‘([^/]+)/custom_render/?$’, ‘index.php?name=$matches[1]&custom_render=true’, ‘top’ ); And then you can us template_inclide hook to check if the query param custom_render is set, then return the name of the new template. Note: You need to flush … Read more

Override All CSS with Custom CSS on a Page by Page Basis

You can replace the page type condition to match your page by ID or slug instead. https://www.webperftools.com/blog/how-to-remove-unused-css-in-wordpress/ function enqueue_pure_styles() { $suffix = ”; if (is_front_page()) { $suffix = ‘.front-page’; } else if (is_page()) { $suffix = ‘.pages’; } else if (is_single()) { $suffix = ‘.blog’; } else if (is_archive()) { $suffix = ‘.archives’; } wp_enqueue_style(‘pure-styles’, … Read more

unique url access control

You can just check if query string “u” exists, else redirect to your “you don’t have access” page. So something like this: if ( isset($_GET(‘u’)) ) { // SHOW YOUR CONTENT } else { header(‘Location: https://domain.com/no-access/’); die(); }