Hello,
You can’t edit directly a remote theme since Restrict editing of remote themes.
Instead of editing it directly you can create a new component what you can attach to the theme.
I assume you want to add an icon to the header signup button.
Follow these steps to achieve it:
-
Go to
/admin/customize/themes/
Customize → Themes -
Click the Components tab and then the Install button
-
On the popup window click Create new button and type the new component name.
-
Click Create button.
-
The component created. Now select FKB Pro theme to activate it.
-
Click the Edit CSS/HTML button.
-
Click the Header tab and paste the below code to that section.
<script type="text/discourse-plugin" version="0.8.13">
api.reopenWidget("header-buttons", {
tagName: "span.header-buttons",
html(attrs) {
if (this.currentUser) {
return;
}
const buttons = [];
if (attrs.canSignUp && !attrs.topic) {
buttons.push(
this.attach("button", {
label: "sign_up",
className: "btn-primary btn-small sign-up-button",
action: "showCreateAccount",
icon: "user"
})
);
}
buttons.push(
this.attach("button", {
label: "log_in",
className: "btn-primary btn-small login-button",
action: "showLogin",
icon: "user"
})
);
return buttons;
}
});
</script>
- Click Save