Wrong Button Link on 404 Page

Hello,

I have WP installed in subfolder >> public_html/wp1

Via .htaccess it is confiruged to work as the site is in the root folder.
So if you go to http://mysite.com it will show the page, but if go to http://mysite.com/wp1 it doesnt work.

But, when theme generates the 404 page, the button on this page links to mysite.com/wp1, which is wrong.
Meanwhile in WP settings>general I had pointed that the site's homepage is mysite.com without /wp1, but theme's System Status shows next:
- Home URL - mysite.com
- Site URL - mysite.com/wp1

I thing there is a mistake in some kind of theme options, how to fix that, that the button on 404 page would point to .com without subfolder?


Comments

  • Hi,

    the button on 404 page is always linking to HOME url and this couldn't be changed unfortunately. We will consider this as an option while future updates but not sure if this could be even made.

    Thanks!
  • Hi,

    I dont know why you so pessimistic about possibility to integrate such a function to theme options page,
    It needs just to change variable <site_url> in 404.php template. Even you can just point that variable to Site Address instead of WordPress Address (settings>>general) and everything will be fine.
    (I'm still sure that it is pointed improperly in development process of theme, simply nobody thought of it).

    PS. To everybody who suffer such a problem:
    You can just make some changes into 404.php template, just do this:
    change this line >> href="<?php echo site_url(); ?>"
    to this >> href="/"

    The weakness of this method is that if you update the theme, you'll need to do this operation again.
  • BTW
    the button on 404 page is always linking to HOME url

    My HOME URL is ***.com without /wp1
    And my WP installation is ***.com/wp1

  • We are not pessimistic at all. And like we told you above, we may consider it when we will get more requests about it and when we finish features and fixes that currently await in queue. Please understand that we can not add any feature you just want because lot’s of users uses poor hosting services and more options/features means higher server requirements.
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.