I can't add search button on the header menu, using casper theme

I tried to add the search button to my theme header box but unfortunately, I found some issues related to Templates that must contain valid Handlebars

I followed some instructions from
How to add search in Ghost

Which version of Ghost are you on? My guess is that you’re on an older version of Ghost that doesn’t include search. Search was released in Ghost v5.3.0.

Any suggestions to add a search to the old version? 4.5

I prefer the older look of ghost casper default theme

You’ll need to update Ghost for search work to work, but you may be able to modify the older version of Casper to work with Ghost v5.

Alternatively, you can look into adding a third-party search library.

Any third-party search library?
I need to add a search ICON button like socials on the header menu, I don’t know really How to modify my Casper theme to work with search functionality? Any help would be grateful

Can you share a link to your site? To add a search icon only, you’ll likely need to edit your theme to include the icon.

You can check the link Ubtask.com
Search icon fully function

Thanks for sharing.

I’m a little confused about what you want to do.

You won’t be able to use Ghost’s native search functionality unless you upgrade Ghost to a current version. I’d recommend this anyway because by staying on an older version you’re missing out on features and security patches.

You can still use your current theme by updating the parts that need to be changed to be compatible with Ghost 5.0.

Otherwise, you’ll need to implement your own search solution. If you already have one and only need an icon, then you can download your theme, look for the social media icons, and follow the pattern there to add an icon for search.

I don’t have much experience with casper and programming languages, How to update the old Casper themes to be compatible with the new 5.0 framework

If you download your current theme, you can scan it at https://gscan.ghost.org. The site will tell you everything that needs to be updated to be compatible.

If you have questions about any of the items, you can ask here in the Forum. There are lots of members who’ll be happy to help.

Check the result

Any suggestions? should I start upgrading my ghost frameworks
If you want my theme ZIP file to be more effective, I will send the file

What is your Ghost version?

4.7 or 4.5 exactly I don’t know which one, any help or doc to use ghostgscan will be gratful

4.7.4 is your Casper theme version. I want to know the ghost version. Anyway, the error is The partial icons.search could not be found.

Lets do this.

Open your theme file.
Go to partails folder.
Create folder named icons
Create a file named search.hbs
Copy and paste below code into the file.

<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" width="20" height="20"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>

Save the file, close it and zip it again and upload it to your website.

Ghost version: 4.48.1
can I ask which version has the same capser defult look with my website and is fully functional or has more updates than my actual ghost version, I know even if I add the icons the search will not works because it’s depending on ghost frameworks, unfortunately I don’t have programming language skills
to add search fully function with my current casper theme.
Any suggetion will be careful
Want to upgrade my ghost cms to specific version ? How to up upgrade my ghost to newer version with the capser theme


check out put

I need to upgrade to a specific version

I will try.

add these to CSS

.gh-head-actions .gh-search {
    margin-right: -4px;
.gh-search {
    align-items: center;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    outline: none;
    padding: 0;
    width: 32px;

If it doesn’t work, let me know.

You must update Ghost to version 5 in order to use Search.