I’ve set a 404 template (custom 404 page) for my 404 errors and unfortunately AIOS plugin can’t detect and log activities related to 404 pages. How can this problem be fixed?
Previously i got help with Rankmath plugin in this topic: https://support.rankmath.com/ticket/empty-404-monitor-with-404-template/
]]>Notice: Trying to get property ‘ID’ of non-object in /path/to/wp-content/plugins/acf-typography-field/includes/functions.php on line 84
Notice: Trying to get property ‘post_content’ of non-object in /path/to/wp-content/plugins/acf-typography-field/includes/functions.php on line 88
The obvious answer is: Add a 404.php template file since every theme really should have one anyways. But it’s not a REQUIRED file, and quite a few themes don’t have one. The theme I’m creating is a single page theme with ZERO other pages at all, so there’s no point in having the 404.php template.
I’m getting around this with a little code snippet to redirect any 404 back to the home/index.php page:
function fol_redirect_to_home_404() {
if (is_404()) {
$url = trailingslashit(get_home_url());
wp_redirect( $url );
exit;
}
}
add_action('get_header', 'fol_redirect_to_home_404');
Even still, I can’t help but think there should be some sort of check within this plugin. Not sure the best way to go about it since some people may actually be using your plugin within 404 pages.
Perhaps check IF is_404() && 404.php exists within the theme, THEN do the code in functions.php starting on line 84. Otherwise, skip it.
It’s not so much an issue with your plugin, but it is something I ONLY encounter with your plugin when there’s no 404.php template. Perhaps it should be accounted for?
]]>How do I modify the Page Not Found so I don’t get the generic 404 Page “It seems we can’t find what you’re looking for. Perhaps searching can help.” ?
Thank you,
Laurie
How to define / insert my own text and pictures there?
]]>I have been trying to figure out how to create custom background image for 404 error page without using a plug in. I have checked out several tutorials, but haven’t been lucky enough to find one that will help me achieve this or do additional styling without the help of a plugin. Any ideas? Here is what my current 404 page looks like.
]]>Clearly there is a function somewhere in the theme doing fancy things with the 404 page. Anyone know how to make this stop?
]]>I read this: https://codex.www.ads-software.com/Creating_an_Error_404_Page
and it wasn’t useful.
I’m using two columns, right and left, for which I have “theme support” – so they’re normally activated when I click on “sidebar template” while writing a post.
But the 404 page doesn’t appear in admin and so I just edit it with notepad ++. But this: <?php get_sidebar(); ?>
does nothing if I drop it in…
There’s another way to call it because there’s a function for the extra sidebar in my functions file…
Please help.
]]>https://www.ads-software.com/extend/plugins/shortcodes-ultimate/
]]>Is it possible to put one of my forms on my 404 page?
https://www.ads-software.com/extend/plugins/formbuilder/
]]>I’m probably missing something stupid but the template is called 404.php; it’s very simple, it’s in the content/theme folder where it belongs, it shows up in the admin Appearance editor…
Can anyone help?
Thanks!