Site logo

Archived topic

HOME URL WITH JS

2 replies · Started by Richard on November 15, 2019

Viewing posts 1–3 of 3

Hi guys,

I have a few new websites with GeneratePress (what else?), where there is an enter page, and then when you enter, home isn't home URL but the /news/ page. For example:

https://farajijacobs.com/enter/

So the home URL of the logo should be https://farajijacobs.com/news/

I am using Elementor for the Footer, so that isn't the issue, but for the menu I am using TapTap, which doesn't know, of course, that I want the logo to link to /news/.

I know this is not directly related to GP, but the developers of the previous installed theme, gave me this code and it worked. Would something similar work in this case as well? I am not too familiar with JS, so I thought I'd ask, as it might also be a similar function when using GP for the menu.

$(window).load(function () {
$('.classic-menu .logo a').attr('href', '/news');
})

Thank you in advance!
Richard

P.S. Obviously, /enter will be home when the site is live, which is the actual conflict: we don't want people always returning to the enter page when they click on the logo. An old-fashioned way is actually creating 2 WP installs or having multisite, but rather over-blown just to have an enter page on home, and the rest of the site in a sub-folder.

This archived topic is closed to new replies.