• Resolved hernan96

    (@hernan96)


    Hello everyone,

    I was wondering if there was some way to highlight text in bold when you’re searching for words. For example. Currently, my new website shows the extract but the first few words as well as Table of Content from Elementor (which I don’t know how to remove it).

    I was watching this video but my theme (Bard) does not have neither search.php nor content.php, so I have no idea where the code is located. I even don’t know if I should create it from scratch to make it work. I have no idea if it is a WordPress thing in general or a theme thing, that is why I post it here.

    I’m not too knowledgeable in PHP, so I don’t know where to start.

    Best regards.

    • This topic was modified 2 years, 10 months ago by James Huff. Reason: redundant link removed

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter hernan96

    (@hernan96)

    I do appreciate the reply. However, you’re missing more than one point in what I’m looking for.

    First and foremost, that plugin is uneasy to understand. As I previously mentioned, my knowledge on PHP is absolutely none. I don’t want the results to look like something taken from an Universitarian’s notes. I want them to look in bold and with no background color. It says I can modify that through CSS but since I have no idea about how this works, this plugin is pointless. Aside from that, it’s still showing up the first words of the extract, I want to show the extract containing the matching result. ?Me entiendes?

    Second, I mentioned there’s no search.php, so I cannot insert these codes into my website.

    Well then it sounds like you are out of your element.

    What’s hard about installing a plugin?
    https://www.ads-software.com/plugins/highlight-search-terms/
    And if you install then, and want help with the CSS then just post your question to the support forum.

    If you don’t have a searchform or search file in your theme, then you can just add it:
    https://codex.www.ads-software.com/Creating_a_Search_Page
    https://searchwp.com/v3/docs/kb/customize-search-form-selectively-modify-engine-weights/

    If this it outside your capabilities you can ask for help in places like:
    https://jobs.wordpress.net
    or
    https://www.codeable.io
    The task is pretty straight-forward.

    Thread Starter hernan96

    (@hernan96)

    You aren’t getting my idea, don’t you?

    First of all, I KNOW how to add plugins. I don’t get how it works, plus it doesn’t met the things I want. I have basic knowledge of HTML and CSS, I have studied for that. What I DO NOT KNOW is PHP, yet you add links of PHP codes which I do not understand. I know it’s copy/paste but like I said before I don’t know PHP.

    I’m asking for something so simple and you complicate it even more.

    You should probably read through your other interactions on the support forums, and perhaps you can determine where the problem may lie.
    https://www.ads-software.com/support/users/hernan96/replies/

    Good luck.

    Thread Starter hernan96

    (@hernan96)

    Thanks for the no help.

    No problem.

    Some people come here to learn and be supported by the volunteers who put their time in to support the open-source community.

    Other people come here to be contentious with the expectation to have their hand held the entire time while poorly describing their requirements.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Have you looked at the plugin “relevanssi”? It lets you do all sorts of stuff with the returned search snippets, including highlighting the searched term(s).

    Thread Starter hernan96

    (@hernan96)

    Have you looked at the plugin “relevanssi”? It lets you do all sorts of stuff with the returned search snippets, including highlighting the searched term(s).

    Sorry for the delay. Appreciate the recommendation. While testing it, I realised it wasn’t working with any theme made by WP Royal and for some reason, I ultimately messed up the design as the sidebar was only showing in the search result, so I had to change of theme and re-work on everything to make it fitting for my liking.

    No problem.

    Some people come here to learn and be supported by the volunteers who put their time in to support the open-source community.

    Other people come here to be contentious with the expectation to have their hand held the entire time while poorly describing their requirements.

    Yeah, you’re right. I was expecting to have the solution held on my hand, shame on me. I would have solved it by myself if I had studied PHP. However, by the time I was going to do the course, Corona hit, I had some episodes of depressions and here I am, asking for some help. Aside from that, I gave examples of what I wanted and someone was able to come up with something, so I guess my issue wasn’t “poorly described”. Yes, English might not be my first language but I choose to use it over Spanish as it is more universal so to speak. However, none of this excuse the way I replied to you, so sorry for that.

    With that being said, I have this issue solved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Highlight Text in Search Results’ is closed to new replies.