Highlighting Text in Search Results

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 …
Category: Web

WordPress site using Yoast SEO being blocked from indexing by robots.txt

Morning all! I've just built a website for a client, using WordPress and the Yoast SEO plugin (free version). https://www.fly2help.org/ Whilst they're really happy with the website, I've noticed an issue when trying to submit it to search engines, such as Google, for indexing. It is continually being blocked, with an error like this: Crawl allowed? error No: blocked by robots.txt I'm not 100% sure why this is the case. I've checked the robots.txt file and there's nothing in it …
Category: Web

Extending a custom framework built into WordPress to automatically turn the 'Search Engine Visibility' setting ON / OFF, dependant on environment

I have a WordPress framework that I am currently working in, it is a thing of beauty, however it is not what I am used to. I am attempting to extend this framework to automatically turn the toggle (found here: Dashboard -> Settings -> Reading -> Search engine visibility) ON or OFF dependant on the environment (Local / Develop / Staging / Live). I have .env files set up that contain different parts of the settings for that environment, and …
Category: Web

How to ensure that a landing page created with WordPress does not enter the sitemap?

We have been creating landing pages for our clients whose employees will submit a form on them. We don't want these pages to be visible to search engines. We are using Rank Math SEO to set no index on these pages hoping search engines won't crawl them. However, I see our WordPress sitemap has several of these client landing pages listed. How to ensure that a landing page created with WordPress does not enter the sitemap?
Category: Web

Wordpress Schema.org Markup. What value does it add?

I've been adding all the "recommended" schema.org markup to my sites for awhile now. Most of the schema markup adds value to google searches. There's other markup though that I've been using and I'm not really sure who actually uses it (search engines, other sites, etc). Specifically, for this question, I'm wondering about the wordpress related schema.org markup: Header: <header itemscope itemtype="https://schema.org/WPHeader"> Sidebar: <aside itemscope itemtype="https://schema.org/WPSideBar"> Footer: <footer itemscope itemtype="https://schema.org/WPFooter"> Does anyone know what the purpose of this markup is? …
Category: Web

Searching in wordpress using wp_term_taxonomy table

I have been trying for some time now to return search results not only of products from woocommerce but also for anything that is found on the rest of my site. If you search for SKU "4110-26" then it jumps straight to the product however it doesn't show any pages where the text "4110-26" can be found. The text I want to search is mainly kept in the wp_term_taxonomy table in the MySQL data base. Is there a way I …
Category: Web

Search results: How to add direct jump to anchor?

I would like to add "Jump to section" links directly to the WordPress search results. Example: Say I have long product page with description of several products. Say the page "Products" contains "Flux Capacitor", "Shrink ray" and "Batvision" products. Now, if someone searches for "Batvision", they (correctly) see link to "Products" page. However, in order to find the Batvision, they have to scroll way down to correct section of such page. Basically, I am trying to find this solution, but …
Category: Web

Simple way to search custom-post types only

I'm just trying to find a way to narrow my current search bar so that it only searches within my 'events' custom post-type. I do not want the search to index any other post type, only 'events'. Here's the search bar: <form id="searchform" action="http://localhost:8888/ltc" method="get"> <input class="inlineSearch" type="text" name="s" value="Enter a keyword" onblur="if (this.value == '') {this.value = 'Enter a keyword';}" onfocus="if (this.value == 'Enter a keyword') {this.value = '';}" /> <input class="inlineSubmit" id="searchsubmit" type="submit" alt="Search" value="Search" /> </form> And …
Category: Web

Replace/Mute/Stop Search Query

I'm trying to replace the search functionality in WP. I've already created the search.php template with all the results I want to display. I don't want any results from the WP database. I just want to show my results in search.php using the native searchform.php and the native ?s=keyword URL structure. Doing that because of SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts ... search built in query with is very CPU consuming. So in my themes functions.php I added: add_action('pre_get_posts', 'no_search_query'); function …
Category: Web

What makes WP so SEO friendly?

I keep hearing that Wordpress is the best SEO solution, better than most static websites because of multiple reasons. I then go on to hear contradicting information elsewhere. So: Is Wordpress generally more SEO friendly/ready then most static html websites? What makes it more SEO friendly? Can I take any SEO tips from a Wordpress installation to improve a static HTML page SEO?
Category: Web

FacetWP: Plugin breaks button/modal functionality inside searchable content area

I am currently testing the FacetWP trial with two facets on a post archive page, using the WP-show-posts plugin for displaying posts and modal-video.js (https://github.com/appleple/modal-video) for modal functionality. Everything works great until FacetWP sorts the content, after that it breaks all buttons activating the modal-video.js modals. Here’s a short video of what I mean: https://vimeo.com/349432438 I suspect that by adding a bunch of classes, ids and jquery to the exisiting content/page, FacetWP breaks the already existing scripts that work for …
Category: Web

How do I change the web site summary in search results?

I have a web site that I am working on, hendersonvillecameraclub.org. When I use Google to search for the site using 'hendersonville camera club' as the search terms my site is the 6th result. Below the page title, it gives a snippet of the most recent post on the site. My question is, how do I change what information is displayed in the summary? I would prefer to put some static text there that provides a better description of the …
Category: Web

The search engine of my website finds only posts and not pages, how can I solve this problem?

I have a curious problem with the Wordpress search engine of my website (the one that makes URLs as http://sitename.com?s=searched+word). When I installed Wordpress I noticed that when I used the search engine of my website, the results was only posts... it was as if the pages did not exist. Anyway, I don't know if that is normal for Wordpress blogs. After months, I was searching a word and I noticed that in the results the pages appeared! This amazing …
Category: Web

Links to root domain from search engines don't work, but direct links and links from other referrers do

I've got a really odd situation with a wordpress website I manage - when I directly type the domain into my browser, the site comes up just fine - similarly, when I click a link to my site from another website (like LinkedIn, as one example), the site comes up just fine. Here's the working example: However, when I search for my company on major search engines (Google and Bing both, but there may be others), the link appears to …
Category: Web

Completely remove custom post type permalinks ("One Page" website)

I created a one page style website that I converted to WordPress. The website include a blog, but I'm not using the usual WordPress way to display the post as I'm using a modal window appearing on click to displaying it. So basically I'm not using the Pages/Posts/Comments admin sections at all. Instead I decided to go with custom post types and create my own PHP loops. This is working pretty great for now. But I have a problem with …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.