[Resolved] Stop logo/header from linking to my site

Home Forums Support [Resolved] Stop logo/header from linking to my site

Home Forums Support Stop logo/header from linking to my site

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #816225
    Chris

    Hello! I’m trying to disable the link on my header logo and I don’t know how. Can you help me? I don’t want the logo/header image to be click-able. I just want the image as an image i.e. non click-able. Can I do that with some simple css or some php?

    Thanks
    Chris

    p.s.
    I’m not technical and would not know how to do this or start editing scripts, though I believe I can use code snippets plugin if I have to add some php code.

    #816398
    David
    Staff
    Customer Support

    Hi there,

    simplest method is to block the pointer-event to it can’t be clicked with this CSS:

    .site-logo a {
        pointer-events: none;
    }

    Methods of adding CSS:

    https://docs.generatepress.com/article/adding-css/

    #816402
    Chris

    Brilliant! That worked, thanks ever so much.

    #816446
    David
    Staff
    Customer Support

    Glad to be of help.

    #1865264
    Joe

    site is joe-holmes.com I want to remove the link on my header. Ive tried css .site-logo a {
    pointer-events: none;
    }
    and it still has a link
    any help is appreciated

    #1865272
    Ying
    Staff
    Customer Support

    Hi Joe,

    Try this one:

    .site-logo {
        pointer-events: none;
    }
    #1865919
    Joe

    Thanks for your suggestion. It did not work so I removed all previous scripts and used only your script it now works. I will need to monitor my site for a while to see if removing scripts affect it.
    Thanks for the help.

    #1866779
    Ying
    Staff
    Customer Support

    There might be some formatting issue in your other CSS that stops this one from working.

    You can try a tool like this to find out any problem in your CSS:
    https://jigsaw.w3.org/css-validator/#validate_by_input

    Hope it’s helpful 🙂

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