Friday Madness

40%

Grab Discount
Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

Bolding search term on results page

4 days 11 hours ago #1

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 681
Hello

On a previous website you provided solution to highlight the entered search term on the results page (i.e. change style to bold) using .search-text class and CSS

On the site I am creating now, when viewing the search heading via Inspector, the .search-text tag is not visible - therefore using the above CSS is not working.

It only displays the H1 reference as a whole - no way to target the "search term" to style it.

I am wondering if this is a result of updated coding/version of GB?

I am hoping you can provide a way to isolate the search term so it can be highlighted?

Here i the URL to the site in question:

d7570502.zz1674.pgadvdesign.com/
Attachments:

3 days 22 hours ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
Hello,
Thank you for contacting us

No need to add any code,
you can style this in the plugin settings.
nimb.ws/9feniQ

Regards,
Vyacheslav, Balbooa.com

3 days 13 hours ago #3

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 681
Thanks, but I'm asking how to style the "search term" - not the whole heading.

I have attached an example for another site (huntingtonu.ca) where the CSS you provided was applied as a bolder weight than "Search results for"

<h1>
Search results for
<span class="search-text"> course</span>==0
</h1>

However, the new site does not display the search term element (<span class="search-text"> course</span>==0)

So is there is no way to target it to apply the CSS.

I hope this is clear.

Thank you.
Attachments:

2 days 22 hours ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
Hello,
Thank you for contacting us

As we can see this is done using JS custom code.
Which you added to the code editor

Regards,
Vyacheslav, Balbooa.com

2 days 15 hours ago #5

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 681
Thanks Vyacheslav

I forgot about that.

So I added the JS and still no change. I have cleared cache and tried on alternate browsers - no change to keyword style :(

Can you have one more look to see what is the cause?

Also, seeing as we can only have one Search Results Page for multi=language sites, can you instruct me where to locate the file that contains "Search results for" text so I can modify by adding French with it?
Attachments:

1 day 22 hours ago #6

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
Hello,

How we see your code is working (example in the video)
nimb.ws/ieJ7X4

"Search results for" you can change in the plugin settings


Regards,
Vyacheslav, Balbooa.com

1 day 14 hours ago #7

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 681
Thanks - the issue was that the font name/weight was not assigned to the heading text under Design pop up.
It now works.

Can you please provide info for my second question....

As we can only have one Search Results Page for multi=language sites, can you instruct me where to locate the file that contains "Search results for" text so I can modify by adding French with it?
Attachments:

21 hours 38 minutes ago #8

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 20435
This is not possible, since "Search results for" is set in the plugin settings

Regards,
Vyacheslav, Balbooa.com
Powered by Kunena Forum