Hi
Is there a way to create a cloud template, or a way to handle 410 pages in the same way as 404 pages, but with a different message, something like not ‘Page not found’ but ‘Page removed’ or something similar?
Thanks, Luca
Hi Luca, the Newspaper theme does not have this kind of template, but it can be achive with custom code or an extra plugin: https://www.youtube.com/watch?v=45iWiRZpuOo
thanks for your reply, I already use a code in template_redirect action in funcitons.php, see below, to remove some sections and automated pages that I don’t need anymore on a specific site.ho provato ad incollare il codice ma wordfence non mi lascia inviare il messaggio. I tried pasting the code, but Wordfence won’t let me send the message. Basically, I’m using a wp_die with a 410 response, and it works, but I’d like to include a design that’s more similar to the site pages created with TD Composer, Cloud Template or modules.
HI,
Could you provide a link to your website where I cna see a 410 redirect? Maybe I will see a solution to this.
Indeed, Wordfence will block you if you try to set teh code directly here. You can use something like https://pastebin.com/ to share the code.
Hi Calin, thanks again.
In fact, I managed to find a fairly simple solution: instead of using wp_die for 404 pages, I simply use this code:
status_header(410);
nocache_headers();
get_header();
echo “page has gone”;
get_footer();
exit;
This is enough to ensure the page matches the site’s design.
Thanks again and best regards, Luca
