Tagged: frontpage settings
-
AuthorPosts
-
October 10, 2024 at 8:11 am #1468773
Dear support team, dear forum,
As part of the frontpage setting, I have selected a page that is unfortunately not displayed. Only when I specify this page as a custom 404 page is it displayed. However, I then get the https://MEINESEITE.com/?avia_forced_reroute=1 after my domain name in the address field.
If I use the option “Display selected page without redirect” under the custom 404 settings, there is no addition in the address bar.
Do you have any idea why my selected page in the frontpage setting is not working?
Many thanks.Kind regards,
bleistiftEnfold 6.0.5, WP 6.6.2
-
This topic was modified 1 year, 1 month ago by
bleistift. Reason: Additions
October 10, 2024 at 9:40 am #1468781Hey bleistift,
I changed the 404 settings and it’s working as expected, please review your site. Note that you cannot use your front page as the custom 404 page, please try creating a dedicated 404 page instead.
Best regards,
RikardOctober 10, 2024 at 6:56 pm #1468860is that what you like to have not a Maintenance Mode Page. Why do you work with a 404 page instead?
there might be good reasons to redirect all 404 to the home page url.
And this is the snippet way to do it –
put in your child-theme functions.php:add_action('template_redirect', function(){ if(is_404()){ wp_safe_redirect(home_url()); exit(); } });October 10, 2024 at 10:47 pm #1468876Offtopic
by the way – the template_redirect could be used to have not the ugly : //domain/?s=xyz on search results page
but //domain/search/xyzfunction re_rewrite_rules() { global $wp_rewrite; $wp_rewrite->search_base = 'search'; $wp_rewrite->flush_rules(); } add_action('init', 're_rewrite_rules'); function change_search_url() { if ( is_search() && ! empty( $_GET['s'] ) ) { wp_redirect( home_url( '/search/' ) . urlencode( get_query_var( 's' ) ) ); exit(); } } add_action( 'template_redirect', 'change_search_url' ); -
This topic was modified 1 year, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
