[Support request] HOME URL WITH JS

Home Forums Support [Support request] HOME URL WITH JS

Home Forums Support HOME URL WITH JS

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1064431
    Richard

    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

    #1064434
    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.

    #1064488
    Leo
    Staff
    Customer Support

    Hi there,

    So are you trying to change where the site logo links to when clicked?

    If so you can use this filter:
    https://docs.generatepress.com/article/generate_logo_href/

    See some examples here:
    https://generatepress.com/forums/search/generate_logo_href/

    Let me know if this helps 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.