Remove search function and replace with text

  • Unknown's avatar

    Any advice on how to remove the search button on the top right hand corner of my website and replace it with text “Call 0207 735 6722”, would be fantastic. I don’t need the search function on my website and having the telephone number visible is key.

    Any help would be much appreciated.

    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hello there!

    Dropping this code in your custom CSS area should do the trick:

    #site-search .search-toggle {
    	display: none;
    }
    
    #site-search::before {
    	content: "Call 0207 735 6722";
    	display: block;
    	padding: 13px 20px 0 0;
    	font-size: 20px;
    }

    Let me know if that doesn’t work!
    Sage

  • Unknown's avatar

    Perfect, thank you so much Sage!

    Is there a way of splitting the colouring of the text, so that ‘Call” is in one colour and the number in a different colour?

    Thanks alot
    Jo

  • Unknown's avatar

    Hey Jo,

    Generally there wouldn’t be a way to specify one word out of the text with this sort of thing…but I figured out a workaround!

    If you take out the previous code I gave you and replace with this:

    #site-search .search-toggle {
    	display: none;
    }
    #site-search::after {
    	content: "0207 735 6722";
    	display: block;
    	padding: 13px 20px 0 0;
    	font-size: 1.1em;
    	color: #717784;
    	font-weight: 600;
    	float: left;
    }
    #site-search::before {
    	content: "Call";
    	display: block;
    	padding: 13px 20px 0 0;
    	font-size: 1.1em;
    	color: #3F74E8;
    	font-weight: 600;
    	float: left;
    }

    Hope that helps!
    Sage

  • Unknown's avatar

    Thank you so much, that works perfectly!

    Is there anything I can add to the css to make the telephone number clickable?

    Thanks alot
    Jo

  • Unknown's avatar

    Hi Jo,

    Glad to hear that works! And sorry, but the way it has been added with CSS links can’t be placed in.

    Sorry about that,
    Sage

  • Unknown's avatar

    Thanks for all your help Sage, really appreciate it!

  • Unknown's avatar

    No worries, my pleasure!

  • The topic ‘Remove search function and replace with text’ is closed to new replies.