# Change destination of logo link

**URL:** <https://meta.discourse.org/t/change-destination-of-logo-link/152001>\
**Category:** Product Support\
**Created:** [19 mei 2020 om 21:23 UTC](https://meta.discourse.org/t/change-destination-of-logo-link/152001 "2020-05-19T21:23:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [19 mei 2020 om 23:12 UTC](https://meta.discourse.org/t/change-destination-of-logo-link/152001/3 "2020-05-19T23:12:52Z")

</div>

You rock. I totally appreciate it. Get me to solve a duplicate key in postgres, sure, but the only the simplest CSS makes sense and I only barely even understand the syntax of javascript.

### BUT Wait.

On a completely unrelated note, I just made it so on my wife’s Kanban site clicking the site logo goes to the TODO category. I made [theme component that allows setting the home page to an arbitrary URL](https://github.com/pfaffman/discourse-allow-arbitrary-homepage). I did it like this:

```plaintext
<script type="text/discourse-plugin" version="0.8">
    const { setDefaultHomepage } = require('discourse/lib/utilities');
    if (settings.home_url_override) {
      setDefaultHomepage(settings.home_url_override);
    }
</script>

```

Maybe I should just do something like that instead? Though I’m not sure how to know which categories want their home page remapped. Maybe a site setting with an array of category IDs? I think I can google my way through getting the current category and seeing if that ID is in an array in a site setting.

EDIT: Hmm, but I can’t tell how in a `<script type="text/javascript">` to tell what the category of the current . . . page? . . . is to selectively change the `setDefaultHomepage`.

Does that seem easier?

### But back to the original solution

> [@awesomerobot](#):
>
> I _think_ what’s happening is that you’re clicking on a little sliver of the link that contains `#site-text-logo` ?

I think that sounds right to me, but that doesn’t mean much.

I _think_ it’s that somehow the`<h1>` does the Right Thing, but that the `<a>` is going to the site home?

> [@awesomerobot](#):
>
> You can probably `event.preventDefault();` the `.title a` link within your JS,

I’m just a caveman. I don’t quite know what that means. There’s some stuff that seems a lot like that in the javascript already. Would I make a whole-nuther one of those `$(document).ready(function() {` things? or add just another ` $(".title #site-text-logo").click(function(event){` in there somehow?

The thing I tried didn’t seem to do anything different.

> [@awesomerobot](#):
>
> or possibly try `.title a {pointer-events: none;}` in the CSS?

I sort of understood this one better and did this:

```css
/* keep tiny bit near logo from linking to home page */
.title a {pointer-events: none;} 

```

This one changed something! And I see that it worked because now none of the logo will do anything.

---

_[View the full topic](https://meta.discourse.org/t/change-destination-of-logo-link/152001)._
