• Hello,

    I have a problem setting the home page. The theme shows the one I set up earlier and can’t be changed (I have no idea why). I have already reported this issue in support of the theme. However, no one has answered me yet and I do not have time to wait.

    That’s why I came up with two solutions.

    1. Use another theme where it works. But I would have to find something very similar, which I don’t want. That’s why it’s better

    2. Solve it with a code. It might be that after loading the site, a specific page would be loaded using JS. However, this poses two problems.

    2.1 The URL would not be in the form domain.cz, but domain.cz/page. Although, it’s nothing more than an acoustic problem

    2.2 Worse, the page that is set as the home page cannot be displayed at all. So I would probably have to create another blank page to set as my home page to solve this problem.

    Anyway, I need some simple code to do this. Or is there a third possible solution?

    Please help

    Thank you

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter michalrama

    (@michalrama)

    UPDATE:

    So in the end, the second solution worked. I created a blank page (which I did not add to the menu) and set it as the home page. Subsequently, I added this JS code.

    if(window.location.href === "https://www.domain.cz/"){
      window.location.replace('https://www.handpro.cz/page/');
    }

    The problem is that on a PC with slow internet, loading another page is more than obvious. Is there a way to optimize it, please?

    Thank you

    Moderator threadi

    (@threadi)

    You can set the page you wish to be the homepage in the settings. Take a look here: https://wordpress.org/support/article/settings-reading-screen/

    Thread Starter michalrama

    (@michalrama)

    Hello @threadi

    No matter which way I set the home page (using WP or theme), the result is the same. However, when I tried changing the theme, it already worked, so the problem is purely in the theme and I won’t do anything about it with WP.

    Moderator threadi

    (@threadi)

    I see you already asked the theme-developer:
    https://wordpress.org/support/topic/changing-the-home-page-doesnt-work/

    Unfortunately, we can’t help you here. You have to wait for an answer from there. Alternatively, you can also choose a different theme.

    Thread Starter michalrama

    (@michalrama)

    I see you already asked the theme-developer:
    https://wordpress.org/support/topic/changing-the-home-page-doesnt-work/

    Yes, however, in the future it is planned to change the theme to a single one on all sites, so it won’t be there as a result. Rather, I wrote it to point out this problem. And honestly, if it weren’t for the current situation in Eastern Europe, I don’t know about this problem at all.

    Unfortunately, we can’t help you here. You have to wait for an answer from there. Alternatively, you can also choose a different theme.

    Of course, I wrote this here only to temporarily work around this problem, which occurred to me as I wrote this question.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Setting up a homescreen using JS?’ is closed to new replies.