Cannot get the Custom Header Links to display?

Hi guys.
As a novice I must assume I’m missing something.
I in CustomizeThemes add included components : custom header link
Then in ComponentsCustom Header Links I add Include component on … : Default

None of pre-set nor my own links appear in the header, when a user is not logged in header only has log in sign up & search icon, on the right.
What is it that I’m missing?

Make sure you are actually using the default theme as your theme.

You can also preview it or the component by using the preview button at bottom to check the settings. This makes it easier to set up components and themes before rolling them out to forum users.

Also double check to make sure you are setting up the header links properly in the component. Check the default ones to see how they are setup.

I’ve just given it a try out on my test site, and mine isn’t showing up either.

It’s in the inspector, but greyed out for some reason?

1 Like

working on mine

1 Like

I do have those, yes. ThemesDefaultTheme is enabled by default
Setup is virtually plain-vanilla, it’s a test-lab.
It appears as if CHL had no effect on my setup, preview or non-logged user, no header at all.
non-logged-in user → sign up & login only,
logged-in user only only three icons: chat, search, user.
version is 3.0.6

You should upgrade to 3.10 or 3.2.0 beta1-dev

I strongly suggest you upgrade your Discourse because there have been significant changes in core since that version, some that affected theme components.

1 Like

I too see it, get it that way.

After a bit of fiddling, I think it’s the example links which are out of date. I think there’s recently been a change to how a plain / is handled. which are causing an issue.

Getting rid of all the example ones and adding something like:

A link, a link, https://meta.discourse.org, vdm, blank

does work:

field description also shows a new Language locale setting (see my second screenshot above) :thinking:

FWIW I just downloaded and installed the component without changing anything, including default links, and it worked :woman_shrugging:t2:

I think you’ve found the winner. :trophy: :slight_smile:

When I remove the locale from the example ones they show up. :+1:

It must be because I’m not on en. That is a little confusing. :slight_smile:

2 Likes

yea I’m on en so that would make sense now.

@lejeczek if you remove the en|language setting at the end of the field strings, it should work.

1 Like

Makes not difference to mine. When CHL got installed, pre-set links included, do explain what @Lilly snapped, locales, eg. of a pre-set link:

External link, this link will open in a new tab, https://meta.discourse.org, vdo, blank, remove, en

adding one similar to that also has no affect.

Can you try it without a locale at all? It may need a newer version of Discourse for that setting option to work.

1 Like

@lejeczek can you please paste the content of your settings editor? (button at bottom right of component)

Whether with or without locale/lang at the end - the same.

oh weird you don’t have a settings editor button. Probably need to upgrade your Discourse.

did you refresh the page after changing the settings?

FWIW, here are my settings on my dev local Discourse install. I edited the default settings for the first one that goes to Meta, and also added one to my FAQ page just to make sure non-default ones work.

Meta, will open in a new tab to Discourse Meta, https://meta.discourse.org, vdo, blank, remove
Most Liked, Posts with the most amount of likes, /latest/?order=op_likes, vdo, self, keep
Privacy, Our Privacy Policy, /privacy, vdm, self, keep
FAQ, Frequently Asked Questions, /faq, vdm, self, keep

Here is the result with a test user (non admin).

As a word of advice, I would limit the number of links to one or two for mobile view. That header gets crowded awfully fast in mobile/ small screen views, especially for anonymous users with the login/sign up buttons.

1 Like