Jump to content

How to redirect search icon to a specific page

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

7 hours ago, rhondahymason said:

Hi guys,

When visitors click the Search icon in my mobile header, is there any way I can get it to redirect them to a specific search page on my site rather than just bringing up the default search page?

Thanks,
Rhonda

We can achieve it with some javascript which is only available on business plan or the above ones. What is your current plan?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
On 11/5/2022 at 9:02 PM, bangank36 said:

We can achieve it with some javascript which is only available on business plan or the above ones. What is your current plan?

I'm currently on the Business Plan.

If I can successfully redirect it, then I can stop stressing about the colours of the header on the mobile search page! 🙂

Edited by rhondahymason
Link to comment
On 11/7/2022 at 10:55 AM, rhondahymason said:

I'm currently on the Business Plan.

If I can successfully redirect it, then I can stop stressing about the colours of the header on the mobile search page! 🙂

If you share link to your site, we can give javascript code to do this.

Or we can use code to insert custom search icon with custom url

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 11/11/2022 at 9:37 AM, rhondahymason said:

I don't see search. Or you want to add a search icon with code to header?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 11/18/2022 at 9:44 AM, rhondahymason said:

Hi @tuanphan, sorry, I've added the search icon back now.

I would love to have it redirect to a specific page rather than the default Search page (so that I can style it the way I want).

Thanks so much!
Rhonda 

Hi,

I still dont see search icon on header

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • Solution
On 11/22/2022 at 5:17 PM, rhondahymason said:

@tuanphan It only appears in the mobile view. Thank you for your time!

Add this to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('.Mobile-bar.Mobile-bar--top .Mobile-bar-search').attr('href','https://google.com');
	});
</script>

Replace google with new page url

If the code work when refresh page only, disable Ajax Loading at Design > Site Styles

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.