Домой Полость рта Сервисы для поиска ключевых слов. Улучшаем релевантность поиска в sphinxsearch Вяхирь search php keywords

Сервисы для поиска ключевых слов. Улучшаем релевантность поиска в sphinxsearch Вяхирь search php keywords

I have title (varchar), description (text), keywords (varchar) fields in my mysql table.

I kept keywords field as I thought I would be searching in this field only. But I now require to search among all three fields. so for keywords "word1 word2 word3", my query becomes

SELECT * FROM myTable WHERE (name LIKE "%word1%" OR description LIKE "%word1%" OR keywords LIKE "%word1%" OR name LIKE "%word2%" OR description LIKE "%word2%" OR keywords LIKE "%word2%" OR name LIKE "%word3%" OR description LIKE "%word3%" OR keywords LIKE "%word3%") AND status = "live"

Looks a bit messy but this works. But now I need to implement synonym search. so for a given word assuming there are a few synonyms available this query becomes more messy as I loop through all of the words. As the requirements are getting clearer, I will need to join this myTable to some other tables as well.

    Do you think the above way is messy and will cause problems as the data grow?

    How can I avoid above mess? Is there any cleaner solution I can go by? Any example will help me.

  • Is there any other method/technique you can recommend to me?

EDIT

@Peter Stuifzand suggested me that I could create one search_index table and store all 3 fields (title,keyword,desc) info on that and do full text search. I understand that additionally this table will include reference to myTable primary key as well.

But my advanced search may include joining mytable with Category table, geographic_location table (for searching within 10, 20 miles etc), filtering by someother criteria and of course, sorting of search results. Do you think using mysql fulltext will not slow it down?

By Ibrahim Diallo

Published Jul 2 2014 ~ 16 minutes read

Search is an important feature on a website. When my few readers want to look for a particular passage on my blog, they use the search box. It used to be powered by Google Search, but I have since then changed it to my own home-brewed version not because I can do better but because it was an interesting challenge.

If you are in a hurry and just want your site to be searchable, well do what I did before, use Google.

// In search.php file $term = isset($_GET["query"])?$_GET["query"]: ""; $term = urlencode($term); $website = urlencode("www.yourwebsite.com"); $redirect = "https://www.google.com/search?q=site%3A{$website}+{$term}"; header("Location: $redirect"); exit;

What it does is pretty simple. Get the term passed by the user, and forward it to Google search page. Limit the search result to our current domain using the site: keyword in the search query. All your pages that are indexed by Google will be available through search now. If you do want to handle your search in house however, then keep reading.

Homemade Search Solution

Before we go any further, try using the search box on this blog. It uses the same process that I will describe below. If you feel that this is what you want then please continue reading.

This solution is catered to small websites. I make use of LIKE with wild cards on both ends, meaning your search cannot be indexed. This means the solution will work fine for your blog or personal website that doesn"t contain tons of data. Port it to a bigger website and it might become very slow. MySQL offers Full Text Search which is not what we are doing here.

Note: If you have 5000 blog posts you are still fine. .

We will take the structure of this blog as a reference. Each blog post has:

  • A title p_title
  • A url p_url
  • A summary p_summary
  • A post content p_content
  • And catergories category.tagname

For every field that matches with our search term, we will give it a score. The score will be based on the importance of the match:

// the exact term matches is found in the title $scoreFullTitle = 6; // match the title in part $scoreTitleKeyword = 5; // the exact term matches is found in the summary $scoreFullSummary = 5; // match the summary in part $scoreSummaryKeyword = 4; // the exact term matches is found in the content $scoreFullDocument = 4; // match the document in part $scoreDocumentKeyword = 3; // matches a category $scoreCategoryKeyword = 2; // matches the url $scoreUrlKeyword = 1;

Before we get started, there are a few words that do not contribute much to a search that should be removed. Example "in","it","a","the","of" ... . We will filter those out and feel free to add any word you think is irrelevant. Another thing is, we want to limit the length of our query. We don"t want a user to write a novel in the search field and crash our MySQL server.

// Remove unnecessary words from the search term and return them as an array function filterSearchKeys($query){ $query = trim(preg_replace("/(\s+)+/", " ", $query)); $words = array(); // expand this list with your words. $list = array("in","it","a","the","of","or","I","you","he","me","us","they","she","to","but","that","this","those","then"); $c = 0; foreach(explode(" ", $query) as $key){ if (in_array($key, $list)){ continue; } $words = $key; if ($c >= 15){ break; } $c++; } return $words; } // limit words number of characters function limitChars($query, $limit = 200){ return substr($query, 0,$limit); }

Our helper functions can now limit character count and filter useless words. The way we will implement our algorithm is by giving a score every time we find a match. We will match words using the if statement and accumulate points as we match more words. At the end we can use that score to sort our results

Note: I will not be showing how to connect to MySQL database. If you are having problems to efficiently connect to the database I recommend reading this .

Let"s give our function a structure first. Note I left placeholders so we can implement sections separately.

Function search($query){ $query = trim($query); if (mb_strlen($query)===0){ // no need for empty search right? return false; } $query = limitChars($query); // Weighing scores $scoreFullTitle = 6; $scoreTitleKeyword = 5; $scoreFullSummary = 5; $scoreSummaryKeyword = 4; $scoreFullDocument = 4; $scoreDocumentKeyword = 3; $scoreCategoryKeyword = 2; $scoreUrlKeyword = 1; $keywords = filterSearchKeys($query); $escQuery = DB::escape($query); // see note above to get db object $titleSQL = array(); $sumSQL = array(); $docSQL = array(); $categorySQL = array(); $urlSQL = array(); /** Matching full occurrences PLACE HOLDER **/ /** Matching Keywords PLACE HOLDER **/ $sql = "SELECT p.p_id,p.p_title,p.p_date_published,p.p_url, p.p_summary,p.p_content,p.thumbnail, ((-- Title score ".implode(" + ", $titleSQL).")+ (-- Summary ".implode(" + ", $sumSQL).")+ (-- document ".implode(" + ", $docSQL).")+ (-- tag/category ".implode(" + ", $categorySQL).")+ (-- url ".implode(" + ", $urlSQL).")) as relevance FROM post p WHERE p.status = "published" HAVING relevance >

In the query, all scores will be summed up as the relevance variable and we can use it to sort the results.

Matching full occurrences

We make sure we have some keywords first then add our query.

If (count($keywords) > 1){ $titleSQL = "if (p_title LIKE "%".$escQuery."%",{$scoreFullTitle},0)"; $sumSQL = "if (p_summary LIKE "%".$escQuery."%",{$scoreFullSummary},0)"; $docSQL = "if (p_content LIKE "%".$escQuery."%",{$scoreFullDocument},0)"; }

Those are the matches with higher score. If the search term matches an article that contains these, they will have higher chances of appearing on top.

Matching keywords occurrences

We loop through all keywords and check if they match any of the fields. For the category match, I used a sub-query since a post can have multiple categories.

Foreach($keywords as $key){ $titleSQL = "if (p_title LIKE "%".DB::escape($key)."%",{$scoreTitleKeyword},0)"; $sumSQL = "if (p_summary LIKE "%".DB::escape($key)."%",{$scoreSummaryKeyword},0)"; $docSQL = "if (p_content LIKE "%".DB::escape($key)."%",{$scoreDocumentKeyword},0)"; $urlSQL = "if (p_url LIKE "%".DB::escape($key)."%",{$scoreUrlKeyword},0)"; $categorySQL = "if ((SELECT count(category.tag_id) FROM category JOIN post_category ON post_category.tag_id = category.tag_id WHERE post_category.post_id = p.post_id AND category.name = "".DB::escape($key)."") > 0,{$scoreCategoryKeyword},0)"; }

Also as pointed by a commenter below, we have to make sure that the these variables are not empty arrays or the query will fail.

// Just incase it"s empty, add 0 if (empty($titleSQL)){ $titleSQL = 0; } if (empty($sumSQL)){ $sumSQL = 0; } if (empty($docSQL)){ $docSQL = 0; } if (empty($urlSQL)){ $urlSQL = 0; } if (empty($tagSQL)){ $tagSQL = 0; }

At the end the queries are all concatenated and added together to determine the relevance of the post to the search term.

// Remove unnecessary words from the search term and return them as an array function filterSearchKeys($query){ $query = trim(preg_replace("/(\s+)+/", " ", $query)); $words = array(); // expand this list with your words. $list = array("in","it","a","the","of","or","I","you","he","me","us","they","she","to","but","that","this","those","then"); $c = 0; foreach(explode(" ", $query) as $key){ if (in_array($key, $list)){ continue; } $words = $key; if ($c >= 15){ break; } $c++; } return $words; } // limit words number of characters function limitChars($query, $limit = 200){ return substr($query, 0,$limit); } function search($query){ $query = trim($query); if (mb_strlen($query)===0){ // no need for empty search right? return false; } $query = limitChars($query); // Weighing scores $scoreFullTitle = 6; $scoreTitleKeyword = 5; $scoreFullSummary = 5; $scoreSummaryKeyword = 4; $scoreFullDocument = 4; $scoreDocumentKeyword = 3; $scoreCategoryKeyword = 2; $scoreUrlKeyword = 1; $keywords = filterSearchKeys($query); $escQuery = DB::escape($query); // see note above to get db object $titleSQL = array(); $sumSQL = array(); $docSQL = array(); $categorySQL = array(); $urlSQL = array(); /** Matching full occurences **/ if (count($keywords) > 1){ $titleSQL = "if (p_title LIKE "%".$escQuery."%",{$scoreFullTitle},0)"; $sumSQL = "if (p_summary LIKE "%".$escQuery."%",{$scoreFullSummary},0)"; $docSQL = "if (p_content LIKE "%".$escQuery."%",{$scoreFullDocument},0)"; } /** Matching Keywords **/ foreach($keywords as $key){ $titleSQL = "if (p_title LIKE "%".DB::escape($key)."%",{$scoreTitleKeyword},0)"; $sumSQL = "if (p_summary LIKE "%".DB::escape($key)."%",{$scoreSummaryKeyword},0)"; $docSQL = "if (p_content LIKE "%".DB::escape($key)."%",{$scoreDocumentKeyword},0)"; $urlSQL = "if (p_url LIKE "%".DB::escape($key)."%",{$scoreUrlKeyword},0)"; $categorySQL = "if ((SELECT count(category.tag_id) FROM category JOIN post_category ON post_category.tag_id = category.tag_id WHERE post_category.post_id = p.post_id AND category.name = "".DB::escape($key)."") > 0,{$scoreCategoryKeyword},0)"; } // Just incase it"s empty, add 0 if (empty($titleSQL)){ $titleSQL = 0; } if (empty($sumSQL)){ $sumSQL = 0; } if (empty($docSQL)){ $docSQL = 0; } if (empty($urlSQL)){ $urlSQL = 0; } if (empty($tagSQL)){ $tagSQL = 0; } $sql = "SELECT p.p_id,p.p_title,p.p_date_published,p.p_url, p.p_summary,p.p_content,p.thumbnail, ((-- Title score ".implode(" + ", $titleSQL).")+ (-- Summary ".implode(" + ", $sumSQL).")+ (-- document ".implode(" + ", $docSQL).")+ (-- tag/category ".implode(" + ", $categorySQL).")+ (-- url ".implode(" + ", $urlSQL).")) as relevance FROM post p WHERE p.status = "published" HAVING relevance > 0 ORDER BY relevance DESC,p.page_views DESC LIMIT 25"; $results = DB::query($sql); if (!$results){ return false; } return $results; }

Now your search.php file can look like this:

$term = isset($_GET["query"])?$_GET["query"]: ""; $search_results = search($term); if (!$search_results) { echo "No results"; exit; } // Print page with results here.

We created a simple search algorithm that can handle a fair amount of content. I arbitrarily chose the score for each match, feel free to tweak it to something that works best for you. And there is always room for improvement.

It is a good idea to track the search term coming from your users, this way you can see if most users search for the same thing. If there is a pattern, then you can save them a trip and just cache the results using Memcached .

If you want to see this search algorithm in action, go ahead and try looking for an article on the search box on top of the page. I have added extra features like returning the part where the match was found in the text. Feel free to add features to yours.

Did you like this article? You can subscribe to read more awesome ones. .

On a related note, here are some interesting articles.

It is time to deal with mysql_* functions once and for all. These methods are deprecated and slow. The time to upgrade has long passed yet we still see it everywhere. Since I cannot force every author to update their tutorial and blogs, I decided to write a post to hopefully rank better and provide the essential information to help new comers.

Making your own website shouldn"t be too difficult. Hosting companies like Godaddy or Hostgator make it super easy for anyone to get started; they allow you to create a whole website without ever writing code. For most people, it is plenty to run a WordPress blog. If this is what you are looking for you should head to Godaddy.com right now. We are done here. But on the other hand, if you want to have control and not be limited by the short comings of a shared hosting without busting your wallet, you have come to the right place.

Vim is my favorite text editor on the terminal. After playing for a little while with nano and emacs , I finally settled with vim for its simplicity (bare with me please). Although it can be customized and used like an entire IDE, I use it mostly for editing files on my servers and making small but crucial changes. Let"s not get into Editor war and get started.

Comments(45)

Zaryel Aug 12 2015:

Ian Mustafa Sep 26 2015:

Rob Sep 29 2015:

adeem Feb 11 2016:

Ivan Venediktov Apr 9 2016.

Безусловно, о значении метатегов знает каждый, кто имеет хоть какое-то представление о поисковом продвижении. Все в курсе о важности тегов title, description, h1-h6, alt и других. Никто не отрицает, что они влияют на оптимизацию сайта. Но к одному из тегов поисковые системы относятся неоднозначно - к тегу keywords.

В последние годы в Сети развернулась жаркая дискуссия, которая не утихает по сей день: стоит ли вообще использовать метатег keywords? К сожалению, точного ответа до сих пор никто дать не может. Рассмотрим различные точки зрения и попробуем разобраться в данном вопросе.

Что такое keywords?

Keywords - это ключевые слова (не более 20 для одной страницы сайта), соответствующие содержимому страницы.

В коде страницы этот метатег выглядит вот так:





Изначально тег оказывал существенное влияние на релевантность страниц сайта, а следовательно, и на вывод сайта в топовые позиции поисковых систем .

Зная об этом, владельцы сайта начали хитрить - злоупотреблять keywords или добавлять большое количество неуместных слов в этот тег. И поисковики достаточно быстро это обнаружили.

Что же происходит сейчас?

Как говорится, из крайности в крайность: в итоге поисковики перестали придавать данному тегу вообще какое-либо значение.

Яндекс

Представители Яндекса заявили о keywords следующее: «… может учитываться при определении соответствия страницы поисковым запросам» .

Обратим внимание, что ключевое слово здесь может . Ведь может совсем не значит учитывается .

Google

Система не оставляет никаких сомнений и не дает почвы для размышлений. Тут все лаконично и ясно: «We don’t use keywords meta-tag in a search-ranking», «Google has ignored the keywords meta tag for years and currently we see no need to change that policy» .

«Мы не используем метатег keywords в поисковом ранжировании», «Google игнорирует метатег keywords в течение многих лет, и в настоящее время нет необходимости менять эту политику» .

Rambler, Yahoo, Mail.ru

Разделяют мнение Гугла и считают, что метатег keywords исчерпал себя. Поэтому совсем не учитывается данными поисковиками.

Но почему многие по-прежнему используют keywords?

Скорее всего, это связано с неоднозначной формулировкой Яндекса о теге. Логика владельцев сайтов такая: если есть надежда, что все-таки Яндекс учтет тег, а Google, Rambler, Yahoo иMail.ru относятся к метатегу нейтрально, то от его заполнения хуже не станет.

А если станет?

Среди оптимизаторов существует мнение, что заполнение тега keywords может принести вред. Если поисковики не учитывают тег как тег, то текст, вписанный в него, считывается как обычный текст сайта. И если данные ключи, вы уже использовали в других тегах и в теле текста, то есть риск «переспамить» страницу ключами. Ну а за переспам (излишнюю тошноту) можно попасть под фильтр.

Точка зрения 1PS

До сих пор мы описывали общую ситуацию и различные мнения по вопросу. У каждого своя точка зрения. Наша заключается в том, что тег keywords лучше не заполнять. Пользы от него точно нет, а вот риск попасть под фильтр все же есть.

Лучше продвигать сайт за счет правильного контента, тегов , <H>, <alt>и иных способов технической оптимизации . Кстати, большая часть этих приемов учтена в услуге Поисковое Продвижение .</p> <p>P.S. Удачи вам в продвижении своего ресурса.</p> <p>We help a variety of clients with their internet marketing and websites, and one question we often get is “How do you add keywords to a website?” You might picture us adding extremely complicated formulas and codes into a computer screen.</p> <p>But the truth is the basics are easier than you might think. We even teach our clients that manage their own business blogs how to keyword their website pages so that they can be found on search engines easier. The goal of this blog article is to teach you some fundamentals on how to add keywords to a website. Not sure you wan"t to put in the time? Take a look at our SEO Services here, we would be happy to help you.</p> <h2>Why Should You Know How to Add Keywords to a Website?</h2> <p>By learning how to add keywords to a website you will be able to keyword your own blogs, website pages, and other internet marketing materials. You will also gain context for why SEO is so important for your business.</p> <h3>How Can Adding Keywords to My Website Help My Business?</h3> <p>Adding keywords to your website helps search engines understand what your website can offer someone searching, and ultimately bring you more qualified traffic. How? With identifiers, like keywords. <b>Without Keywords on your website pages there is no way for a search engine to categorize your website and show it to the right people searching </b>.Think of it this way, a well written paper has a thesis, and supporting arguments that relate to the thesis. Readers of well written papers have a clear understanding of what the subject is and what the paper is about. This is the same theory behind Google and other search engines. In fact two students from Stanford created Google with this same idea in mind.</p> <p>A well made website has a main subject, and often has sub categories that relate to the main subject, and by keywording each of these areas we are able to give a clear picture to search engines, and people searching are able to find you more easily. For example:</p> <p><b>Your Main Subject Might Be: </b> Doughnuts</p> <p><b>Your Sub-Categories or Topics Could Be: </b> Cake, Dougnut Holes, Bars,…</p> <h4>Choosing Keywords for Your Website</h4> <p>Now that you understand the framework of a site and how it matters it’s time to choose keywords. How? We use a number of tools and perform extensive research for our keywords; however one tool that is free is the Google Keyword Tool. Simply input your location information and category, then type in the main subject of your website. The tool will generate a number of keywords, and give you stats like these:</p> <p><b>Competition: </b> (Low, Med, High) This tells you how many people are trying to keyword for that word or phrase. The higher the competition the more difficult it is to rank high in Google for that search term.</p> <p><b>Global Monthly Volume: </b> </span> How many searches are made per month globally for that term.</p> <p><b>Local Monthly: </b> Is determined by the information you put into your search. If you specified your location as the U.S. then it would be the number of monthly searches for that term in the U.S.</p> <p>While this tool is easy to use, all keywords are not treated the same. In fact some keywords bring you more traffic than others, and some might bring you a lot of traffic that never converts. This is why we highly recommend business owners hiring an agency that is educated in SEO and keywording to help them with their internet marketing.</p> <h3>How Many Keywords Do I Need to Add Per Page?</h3> <p>After you have conducted your keyword research you will need to choose <b>one keyword </b> for each of your website pages or blogs. Keywords should be specific to the page topic and relate to your overall website subject.</p> <p><b>Example of Good Keyword Choice: </b></p> <p><i>Main Website Theme: </i> Donut</p> <p><i>Website Page: </i> Maple Donut</p> <p><i>Assigned Keyword: </i> Best Maple Donut </p> <p><b>Example of Bad Keyword Choice: </b></p> <p><i>Main Website Theme: </i> Donut</p> <p><i>Website Page: </i> Maple Donut</p> <p><i>Assigned Keyword: </i> Donut recipes </p> <h3>How to Add Keywords to Your Website Page:</h3> <p>When adding keywords to your website, it is important to include your keyword in 6 places on each page of your website. Including your keyword in these 6 areas will help search engines identify the subject of your page and rank your page in search results.</p> <ol><li>Page Title</li> <li>Meta Description</li> <li>Header</li> <li>Sub Header</li> <li>Body Paragraphs</li> <li>Image Alt Tags</li> </ol><p><b>Page Title & Meta Description: </b></p> <p>Page Titles & Meta Descriptions are a more technical part of keywording your website. However, it is important to recognize how valuable they can be for your internet marketing efforts. What are Page Titles & Meta Descriptions? These parts of your website page actually show up in search results, they are the first impression a searcher gets of your website page.</p> <p><img src='https://i0.wp.com/blog.halfabubbleout.com/hs-fs/hub/215313/file-29901144-png/blog-images/search-example-resized-600.png' align="Center" width="100%" loading=lazy></p> <p>If you do not have access to your website Page Titles or Meta Descriptions then it will be important to check with your website management company that those areas are filled out correctly for SEO.</p> <p><b>Headers: </b></p> <p>Headers are a lot like billboards for search engines. They are one of the biggest ways to show search engines what your main subject is for your page. It is important that you include your entire keyword in your header.</p> <p><b>Sub-Headers: </b></p> <p>Sub-headers are another area to tell search engines what you want the website page to be found for. Think of this area as real-estate, if you don’t try to include your keywords in the sub-header then you are missing out.</p> <p><b>Body Paragraph: </b></p> <p>When writing the body content for your website page you should try to include your keyword, or at least parts of your keyword. Remember to keep your writing natural, search engines will actually penalize you if your writing over stuffs keywords and appears unnatural. When you first try to write with keywords you might find it difficult, but keep practicing! It really does get easier, and you will get better at shaping your content for adding keywords.</p> <p><b>Image Alt Tags: </b></p> <p>Images are a great addition to any webpage, in fact they can even help search engines rank you. Alt tags are essentially a label that you assign to your image so that search engines can read the image. If you don’t use Alt tags for images then search engines will not see it. By keywording these image Alt Tags you are telling search engines "I used a picture and it relates to the subject of my page."</p> <p>There you have it, now you know the basics of how to add keywords to a website. We know it looks daunting, but if you have the time to write your own blogs or website content, then we highly recommend you use some of the tips listed above. These tactics can bring you more traffic to your website, and help qualify your website leads. That means no wasted visits and more customers for your business.</p> <p><i>If you found this article helpful in anyway please ‘share’ it with a friend. </i></p></p> <p>У меня уже несколько раз просили написать статью о том, <b>как реализовать поиск на сайте через PHP </b>. Задача это непростая, я бы даже сказал - очень непростая, поскольку здесь имеется огромное количество нюансов и препятствий. В этой статье я разберу <b>алгоритм поиска на сайте </b>.</p> <p>Давайте предположим, что на нашем сайте имеется множество различных материалов (статей, новостей, заметок и прочего). Всё это добро находится в базе данных. И наша задача - <b>реализовать поиск на сайте </b>. Простейший алгоритм следующий:</p> <ol><li>Создать <b>HTML-форму </b> со строкой поиска, а также кнопкой "<b>Submit </b>". В текстовое поле пользователи будут вводить поисковый запрос, а далее нажимать на кнопку.</li> <li>Получить поисковый запрос (как правило, передаваемый методом <b>GET </b>, но иногда применяют и <b>POST </b>), а также, в целях защиты от <b>XSS </b>, пропустить его через функцию <b>htmlspecialchars() </b>.</li> <li>Сделать выборку из соответствующих таблицы (со статьями, новостями, заметками и прочим) тех записей, в которых содержится поисковый запрос. Показываю примерный SQL-запрос для таких случаев: SELECT * FROM articles WHERE `text_article` LIKE %search% Соответственно, вместо <b>search </b> подставляется строка поиска.</li> <li>Получив записи, в нужном виде выводим их, желательно, по релевантности. Я, например, сделал у себя на сайте так: где больше всего совпадений - та статья и релевантнее, следовательно, ставлю её первой. Скорее всего, Вам этот способ оценки релевантности тоже подойдёт.</li> </ol><p>Многие из Вас скажут, что ничего сложного здесь нет. И будут отчасти правы, однако, давайте разберём такой пример строки поиска: "<b>ищу этот текст </b>". Встаёт вопрос: "<i>А что, собственно, ищется? </i>". То ли ищется точное вхождение текста "<b>ищу этот текст </b>". Или, быть может, ищется текст, где присутствуют все три слова, но которые могут следовать далеко не друг за другом. Или, возможно, ищется текст, где присутствует хотя бы одно из этих слов.</p> <p>И вот здесь задача значительно усложняется. Можно сделать сложную систему синтаксиса (как в поисковых системах), например, ищется точное вхождение, если запрос задан в кавычках. А можно давать выбор пользователям, как именно они хотят проводить поиск (с помощью radio-кнопок). Таким образом, сделано у меня на сайте. Поэтому в предыдущий алгоритм добавляется ещё один пункт: <b>составление SQL-запрос </b>. Вот пример SQL-запроса, когда нужно вытащить все материалы, в которых имеется хотя бы одно слово из запроса "<b>ищу этот текст </b>":</p><p>SELECT * FROM articles WHERE (`text_article` LIKE "%ищу%" OR `text_article` LIKE "%этот%" OR `text_article` LIKE "%текст%") </p><p>Соответственно, в скрипте поиска Вы должны генерировать подобные <b>SQL-запросы </b>, посылать к базе данных, получать ответ и выводить его. Это всё ещё больше усложняется, если Вы выводите записи по релевантности, так как трудно сразу сказать, что должно быть релевантнее: <b>3 </b> точных вхождения запроса, либо <b>10 </b> вхождений частей запроса. У меня на сайте предпочтение всегда отдаётся точным вхожденияи, но этот момент уже достаточно спорен. Безусловно, это сложно, и если это Вы делаете в первый раз, то несколько часов Вы точно потратите. Надеюсь, что мой <b>алгоритм реализации поиска на сайте через PHP </b> Вам поможет.</p> <script type="text/javascript"> <!-- var _acic={dataProvider:10};(function(){var e=document.createElement("script");e.type="text/javascript";e.async=true;e.src="https://www.acint.net/aci.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})() //--> </script><br> <br> <script>document.write("<img style='display:none;' src='//counter.yadro.ru/hit;artfast_after?t44.1;r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+ ";"+Math.random()+ "border='0' width='1' height='1' loading=lazy>");</script> </div> </article> <script> var block_td_uid_7_5a5dcf40018b6 = new tdBlock(); block_td_uid_7_5a5dcf40018b6.id = "td_uid_7_5a5dcf40018b6"; block_td_uid_7_5a5dcf40018b6.atts = '{ "limit":3,"sort":"","post_ids":"","tag_slug":"","autors_id":"","installed_post_types":"","category_id":"","category_ids":"","custom_title":"","custom_url":"","show_child_cat":"","sub_cat_ajax":"","ajax_pagination":"next_prev","header_color":"","header_text_color":"","ajax_pagination_infinite_stop":"","td_column_number":3,"td_ajax_preloading":"","td_ajax_filter_type":"td_custom_related","td_ajax_filter_ids":"","td_filter_default_txt":"\u0412\u0441\u0435","color_preset":"","border_top":"","class":"td_uid_7_5a5dcf40018b6_rand","el_class":"","offset":"","css":"","live_filter":"cur_post_same_categories","live_filter_cur_post_id":1538,"live_filter_cur_post_author":"5"} '; block_td_uid_7_5a5dcf40018b6.td_column_number = "3"; block_td_uid_7_5a5dcf40018b6.block_type = "td_block_related_posts"; block_td_uid_7_5a5dcf40018b6.post_count = "3"; block_td_uid_7_5a5dcf40018b6.found_posts = "67"; block_td_uid_7_5a5dcf40018b6.header_color = ""; block_td_uid_7_5a5dcf40018b6.ajax_pagination_infinite_stop = ""; block_td_uid_7_5a5dcf40018b6.max_num_pages = "23"; tdBlocksArray.push(block_td_uid_7_5a5dcf40018b6); </script> <div class="td_block_wrap td_block_related_posts td_uid_7_5a5dcf40018b6_rand td_with_ajax_pagination td-pb-border-top" data-td-block-uid="td_uid_7_5a5dcf40018b6"> <div id=td_uid_7_5a5dcf40018b6 class="td_block_inner"> <div class="td-related-row"> <div class="td-related-span4"> <div class="td_module_related_posts td-animation-stack td_mod_related_posts"> <div class="td-module-image"> <div class="td-module-thumb"><a href="/kakoi-salat-mozhno-ukrasit-granatom-salat-s-granatom-recepty-s.html" rel="bookmark" title="Салат с гранатом: рецепты с фото"><img width="238" height="178" class="entry-thumb" src="/uploads/2f582fc84f19ec7b0c93b2fb8d62e035.jpg" sizes="(max-width: 238px) 100vw, 238px" alt="Салат с гранатом: рецепты с фото" title="Салат с гранатом: рецепты с фото"/ loading=lazy></a></div> <a href="/category/stomatitis/" class="td-post-category">Стоматит</a> </div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/kakoi-salat-mozhno-ukrasit-granatom-salat-s-granatom-recepty-s.html" rel="bookmark" title="Салат с гранатом: рецепты с фото">Салат с гранатом: рецепты с фото</a></h3> </div> </div> </div> <div class="td-related-span4"> <div class="td_module_related_posts td-animation-stack td_mod_related_posts"> <div class="td-module-image"> <div class="td-module-thumb"><a href="/nadezhda-mandelshtam---vospominaniya-mandelshtam-nadezhda.html" rel="bookmark" title="Мандельштам Надежда: биография и воспоминания «Товарищ чёрных дней»"><img width="238" height="178" class="entry-thumb" src="/uploads/9900cf9551d843ced0dc33c8e6256107.jpg" sizes="(max-width: 238px) 100vw, 238px" alt="Мандельштам Надежда: биография и воспоминания «Товарищ чёрных дней»" title="Мандельштам Надежда: биография и воспоминания «Товарищ чёрных дней»"/ loading=lazy></a></div> <a href="/category/prosthetics-and-implants/" class="td-post-category">Протезирование и имплантация</a> </div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/nadezhda-mandelshtam---vospominaniya-mandelshtam-nadezhda.html" rel="bookmark" title="Мандельштам Надежда: биография и воспоминания «Товарищ чёрных дней»">Мандельштам Надежда: биография и воспоминания «Товарищ чёрных дней»</a></h3> </div> </div> </div> <div class="td-related-span4"> <div class="td_module_related_posts td-animation-stack td_mod_related_posts"> <div class="td-module-image"> <div class="td-module-thumb"><a href="/tranzitornoe-emocionalnoe-rasstroistvo-lichnosti-tranzitornoe-rasstroistvo-lichnosti-bezobidnyi-dia.html" rel="bookmark" title="Транзиторное расстройство личности: безобидный диагноз или серьезная патология?"><img width="238" height="178" class="entry-thumb" src="/uploads/8f26a0d6922ac51b073b95822435763a.jpg" sizes="(max-width: 238px) 100vw, 238px" alt="Транзиторное расстройство личности: безобидный диагноз или серьезная патология?" title="Транзиторное расстройство личности: безобидный диагноз или серьезная патология?"/ loading=lazy></a></div> <a href="/category/stomatitis/" class="td-post-category">Стоматит</a> </div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/tranzitornoe-emocionalnoe-rasstroistvo-lichnosti-tranzitornoe-rasstroistvo-lichnosti-bezobidnyi-dia.html" rel="bookmark" title="Транзиторное расстройство личности: безобидный диагноз или серьезная патология?">Транзиторное расстройство личности: безобидный диагноз или серьезная патология?</a></h3> </div> </div> </div> </div> </div> <div class="td-next-prev-wrap"><a href="#" class="td-ajax-prev-page ajax-page-disabled" id="prev-page-td_uid_7_5a5dcf40018b6" data-td_block_id="td_uid_7_5a5dcf40018b6"><i class="td-icon-font td-icon-menu-left"></i></a><a href="#" class="td-ajax-next-page" id="next-page-td_uid_7_5a5dcf40018b6" data-td_block_id="td_uid_7_5a5dcf40018b6"><i class="td-icon-font td-icon-menu-right"></i></a></div> </div> </div> </div> <div class="td-pb-span4 td-main-sidebar"> <div class="td-ss-main-sidebar"> <div class="td_block_wrap td_block_9 td_block_widget td_uid_12_5a5dcf7cac471_rand td-pb-border-top" data-td-block-uid="td_uid_12_5a5dcf7cac471"> <style scoped> .td_uid_12_5a5dcf7cac471_rand .td_module_wrap:hover .entry-title a, .td_uid_12_5a5dcf7cac471_rand .td-load-more-wrap a:hover, .td_uid_12_5a5dcf7cac471_rand .td_quote_on_blocks, .td_uid_12_5a5dcf7cac471_rand .td-wrapper-pulldown-filter .td-pulldown-filter-display-option:hover, .td_uid_12_5a5dcf7cac471_rand .td-wrapper-pulldown-filter a.td-pulldown-filter-link:hover, .td_uid_12_5a5dcf7cac471_rand .td-instagram-user a { color: #1360a1; } .td_uid_12_5a5dcf7cac471_rand .td-next-prev-wrap a:hover i { background-color: #1360a1; border-color: #1360a1; } .td_uid_12_5a5dcf7cac471_rand .td_module_wrap .td-post-category:hover, .td_uid_12_5a5dcf7cac471_rand .td-trending-now-title, .td_uid_12_5a5dcf7cac471_rand .block-title span, .td_uid_12_5a5dcf7cac471_rand .td-weather-information:before, .td_uid_12_5a5dcf7cac471_rand .td-weather-week:before, .td_uid_12_5a5dcf7cac471_rand .td-exchange-header:before, .td_uid_12_5a5dcf7cac471_rand .block-title a { background-color: #1360a1; } .td_uid_12_5a5dcf7cac471_rand .td-trending-now-title, .td_uid_12_5a5dcf7cac471_rand .block-title span, .td_uid_12_5a5dcf7cac471_rand .block-title a { color: #fff; } </style> <h4 class="block-title"><span>Новое на сайте</span></h4> <div id=td_uid_12_5a5dcf7cac471 class="td_block_inner"> <div class="td-block-span12"> <div class="td_module_8 td_module_wrap"> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/k-chemu-snitsya-roskoshnaya-kvartira-tolkovanie-sna-kvartira-v.html" rel="bookmark" title="Толкование сна квартира в соннике миллера">Толкование сна квартира в соннике миллера</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_8 td_module_wrap"> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/ovsyanaya-kasha-v-banke-s-kefirom-recepty-lenivoi-ovsyanki-v-banke.html" rel="bookmark" title="Рецепты ленивой овсянки в банке">Рецепты ленивой овсянки в банке</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_8 td_module_wrap"> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/mudrost-iz-ssha-amerikanskie-poslovicy-i-pogovorki-amerikanskie.html" rel="bookmark" title="Американские пословицы и поговорки Американские поговорки с переводом">Американские пословицы и поговорки Американские поговорки с переводом</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_8 td_module_wrap"> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/sonnik-koridor-k-chemu-snitsya.html" rel="bookmark" title="Сонник. Коридор к чему снится">Сонник. Коридор к чему снится</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_8 td_module_wrap"> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/prigotovlenie-supov-kartofelnyh.html" rel="bookmark" title="Приготовление супов картофельных">Приготовление супов картофельных</a></h3> <div class="meta-info"> </div> </div> </div> </div> </div> </div> <div class="td_block_wrap td_block_8 td_block_widget td_uid_19_5a5dcf7cb72c3_rand td-pb-border-top" data-td-block-uid="td_uid_19_5a5dcf7cb72c3"> <style scoped> .td_uid_19_5a5dcf7cb72c3_rand .td_module_wrap:hover .entry-title a, .td_uid_19_5a5dcf7cb72c3_rand .td-load-more-wrap a:hover, .td_uid_19_5a5dcf7cb72c3_rand .td_quote_on_blocks, .td_uid_19_5a5dcf7cb72c3_rand .td-wrapper-pulldown-filter .td-pulldown-filter-display-option:hover, .td_uid_19_5a5dcf7cb72c3_rand .td-wrapper-pulldown-filter a.td-pulldown-filter-link:hover, .td_uid_19_5a5dcf7cb72c3_rand .td-instagram-user a { color: #1360a1; } .td_uid_19_5a5dcf7cb72c3_rand .td-next-prev-wrap a:hover i { background-color: #1360a1; border-color: #1360a1; } .td_uid_19_5a5dcf7cb72c3_rand .td_module_wrap .td-post-category:hover, .td_uid_19_5a5dcf7cb72c3_rand .td-trending-now-title, .td_uid_19_5a5dcf7cb72c3_rand .block-title span, .td_uid_19_5a5dcf7cb72c3_rand .td-weather-information:before, .td_uid_19_5a5dcf7cb72c3_rand .td-weather-week:before, .td_uid_19_5a5dcf7cb72c3_rand .td-exchange-header:before, .td_uid_19_5a5dcf7cb72c3_rand .block-title a { background-color: #1360a1; } .td_uid_19_5a5dcf7cb72c3_rand .td-trending-now-title, .td_uid_19_5a5dcf7cb72c3_rand .block-title span, .td_uid_19_5a5dcf7cb72c3_rand .block-title a { color: #fff; } </style> > <h4 class="block-title"><span>Самое популярное</span></h4> <div id=td_uid_19_5a5dcf7cb72c3 class="td_block_inner"> <div class="td-block-span12"> <div class="td_module_7 td_module_wrap td-animation-stack"> <div class="td-module-thumb"><a href="/mir-skandinavskoi-mifologii---skazaniya-o-bogah---tyur-smotret-chto-takoe.html" rel="bookmark" title="Смотреть что такое "ТЮР" в других словарях Бог тюр в скандинавской мифологии"><img width="100" height="75" class="entry-thumb" src="/uploads/14cfae574e2bb16a25e074a1638758cd.jpg" sizes="(max-width: 100px) 100vw, 100px" alt="Смотреть что такое "ТЮР" в других словарях Бог тюр в скандинавской мифологии" title="Смотреть что такое "ТЮР" в других словарях Бог тюр в скандинавской мифологии"/ loading=lazy></a></div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/mir-skandinavskoi-mifologii---skazaniya-o-bogah---tyur-smotret-chto-takoe.html" rel="bookmark" title="Смотреть что такое "ТЮР" в других словарях Бог тюр в скандинавской мифологии">Смотреть что такое "ТЮР" в других словарях Бог тюр в скандинавской мифологии</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_7 td_module_wrap td-animation-stack"> <div class="td-module-thumb"><a href="/prezentaciya-po-geografii-na-temu-ural-9-klass-prezentaciya-na.html" rel="bookmark" title="Презентация на тему "природный район - урал" Презентация по географии тему урал"><img width="100" height="75" class="entry-thumb" src="/uploads/7d9754113c940fff6de0cd0a83b162bc.jpg" sizes="(max-width: 100px) 100vw, 100px" alt="Презентация на тему "природный район - урал" Презентация по географии тему урал" title="Презентация на тему "природный район - урал" Презентация по географии тему урал"/ loading=lazy></a></div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/prezentaciya-po-geografii-na-temu-ural-9-klass-prezentaciya-na.html" rel="bookmark" title="Презентация на тему "природный район - урал" Презентация по географии тему урал">Презентация на тему "природный район - урал" Презентация по географии тему урал</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_7 td_module_wrap td-animation-stack"> <div class="td-module-thumb"><a href="/iskusstvennyi-intellekt-ii-artificial-intelligence-ai-iskusstvennyi-intellekt.html" rel="bookmark" title="Искусственный интеллект: что нам обещают и чем мы рискуем ИИ в искусстве"><img width="100" height="75" class="entry-thumb" src="/uploads/5a00f831c2357b54e53e02ab065df4c3.jpg" sizes="(max-width: 100px) 100vw, 100px" alt="Искусственный интеллект: что нам обещают и чем мы рискуем ИИ в искусстве" title="Искусственный интеллект: что нам обещают и чем мы рискуем ИИ в искусстве"/ loading=lazy></a></div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/iskusstvennyi-intellekt-ii-artificial-intelligence-ai-iskusstvennyi-intellekt.html" rel="bookmark" title="Искусственный интеллект: что нам обещают и чем мы рискуем ИИ в искусстве">Искусственный интеллект: что нам обещают и чем мы рискуем ИИ в искусстве</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_7 td_module_wrap td-animation-stack"> <div class="td-module-thumb"><a href="/issledovatelskaya-rabota-kak-rozhdayutsya-zvezdy-issledovatelskaya-rabota-po.html" rel="bookmark" title="Исследовательская работа по астрономии"><img width="100" height="75" class="entry-thumb" src="/uploads/51070417f77e2be494b7ce12aed84f64.jpg" sizes="(max-width: 100px) 100vw, 100px" alt="Исследовательская работа по астрономии" title="Исследовательская работа по астрономии"/ loading=lazy></a></div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/issledovatelskaya-rabota-kak-rozhdayutsya-zvezdy-issledovatelskaya-rabota-po.html" rel="bookmark" title="Исследовательская работа по астрономии">Исследовательская работа по астрономии</a></h3> <div class="meta-info"> </div> </div> </div> </div> <div class="td-block-span12"> <div class="td_module_7 td_module_wrap td-animation-stack"> <div class="td-module-thumb"><a href="/citaty-i-aforizmy-roberta-kiiosaki-esse-po-knige-roberta.html" rel="bookmark" title="Эссе по книге Роберта Кийосаки «Богатый папа, бедный папа Роберт кийосаки умные мысли"><img width="100" height="75" class="entry-thumb" src="/uploads/c257f02a260eafefc1ef23d18c3ca368.jpg" sizes="(max-width: 100px) 100vw, 100px" alt="Эссе по книге Роберта Кийосаки «Богатый папа, бедный папа Роберт кийосаки умные мысли" title="Эссе по книге Роберта Кийосаки «Богатый папа, бедный папа Роберт кийосаки умные мысли"/ loading=lazy></a></div> <div class="item-details"> <h3 class="entry-title td-module-title"><a href="/citaty-i-aforizmy-roberta-kiiosaki-esse-po-knige-roberta.html" rel="bookmark" title="Эссе по книге Роберта Кийосаки «Богатый папа, бедный папа Роберт кийосаки умные мысли">Эссе по книге Роберта Кийосаки «Богатый папа, бедный папа Роберт кийосаки умные мысли</a></h3> <div class="meta-info"> </div> </div> </div> </div> </div> </div> <div class="td-a-rec td-a-rec-id-sidebar " align="center"> <div id="galyze2" style="height:500px;width:300px;" align="center"></div> </div> </div> </div> </div> </div> </div> <div class="td-footer-container td-container"> <div class="td-pb-row"> <div class="td-pb-span12"> </div> </div> <div class="td-pb-row"> <div class="td-pb-span4"> <div class="td-footer-info td-pb-padding-side"><div class="footer-logo-wrap"><a href="/"></a></div><div class="footer-text-wrap"> © 2024. Портал стоматологических консультаций. </div><div class="footer-social-wrap td-social-style2"> <span class="td-social-icon-wrap"> <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://stomatp22.ru/servisy-dlya-poiska-klyuchevyh-slov-uluchshaem-relevantnost-poiska-v-sphinxsearch.html" title="Facebook"> <i class="td-icon-font td-icon-facebook"></i> </a> </span> <span class="td-social-icon-wrap"> <a target="_blank" href="" title="Instagram"> <i class="td-icon-font td-icon-instagram"></i> </a> </span> <span class="td-social-icon-wrap"> <a target="_blank" href="https://vk.com/share.php?url=https://stomatp22.ru/servisy-dlya-poiska-klyuchevyh-slov-uluchshaem-relevantnost-poiska-v-sphinxsearch.html" title="VKontakte"> <i class="td-icon-font td-icon-vk"></i> </a> </span></div></div> </div> <div class="td-pb-span4"> <div class="td_block_wrap td_block_popular_categories td_block_widget td_uid_22_5a5dcf7cbb072_rand widget widget_categories td-pb-border-top" data-td-block-uid="td_uid_22_5a5dcf7cbb072" > <style scoped> .td_uid_22_5a5dcf7cbb072_rand .td_module_wrap:hover .entry-title a, .td_uid_22_5a5dcf7cbb072_rand .td-load-more-wrap a:hover, .td_uid_22_5a5dcf7cbb072_rand .td_quote_on_blocks, .td_uid_22_5a5dcf7cbb072_rand .td-wrapper-pulldown-filter .td-pulldown-filter-display-option:hover, .td_uid_22_5a5dcf7cbb072_rand .td-wrapper-pulldown-filter a.td-pulldown-filter-link:hover, .td_uid_22_5a5dcf7cbb072_rand .td-instagram-user a { color: #ffffff; } .td_uid_22_5a5dcf7cbb072_rand .td-next-prev-wrap a:hover i { background-color: #ffffff; border-color: #ffffff; } .td_uid_22_5a5dcf7cbb072_rand .td_module_wrap .td-post-category:hover, .td_uid_22_5a5dcf7cbb072_rand .td-trending-now-title, .td_uid_22_5a5dcf7cbb072_rand .block-title span, .td_uid_22_5a5dcf7cbb072_rand .td-weather-information:before, .td_uid_22_5a5dcf7cbb072_rand .td-weather-week:before, .td_uid_22_5a5dcf7cbb072_rand .td-exchange-header:before, .td_uid_22_5a5dcf7cbb072_rand .block-title a { background-color: #ffffff; } .td_uid_22_5a5dcf7cbb072_rand .td-trending-now-title, .td_uid_22_5a5dcf7cbb072_rand .block-title span, .td_uid_22_5a5dcf7cbb072_rand .block-title a { color: #222222; } </style><h4 class="block-title"><span>ПОПУЛЯРНЫЕ РАЗДЕЛЫ </span></h4><ul class="td-pb-padding-side"> <li><a href="/category/orthopedics/">Ортопедия</a></li> <li><a href="/category/tongue-coating/">Налет на языке</a></li> <li><a href="/category/breath/">Запах изо рта</a></li> <li><a href="/category/wisdom-teeth/">Зубы мудрости</a></li> <li><a href="/category/gums/">Десны</a></li> <li><a href="/category/stomatitis/">Стоматит</a></li> <li><a href="/category/removal/">Удаление</a></li> </ul></div> </div> <div class="td-pb-span4"> <aside class="widget woocommerce widget_product_categories"><div class="block-title"><span>Последние статьи</span></div><ul class="product-categories"> <li class="cat-item cat-item-434"><a href="/krasivyi-hram-chudesnyi-hor-vs-eto-na-polyanke-29a-u-metro-moskovskaya.html">Красивый храм, чудесный хор — всё это на Полянке,29А у метро</a></li> <li class="cat-item cat-item-434"><a href="/prisnilis-pustye-yaica-k-chemu-snitsya-mnogo-kurinyh-yaic-sonnik.html">К чему снится много куриных яиц?</a></li> <li class="cat-item cat-item-434"><a href="/russkaya-amerika-istoriya-russkih-v-amerike-russkie-v-ssha---pokorenie.html">История Русских в Америке</a></li> <li class="cat-item cat-item-434"><a href="/plov-iz-kuricy-v-kazane-plov-doma-iz-kuricy-plov-kurinoi-grudkoi-v-kazane.html">Плов дома из курицы Плов куриной грудкой в казане</a></li> <li class="cat-item cat-item-434"><a href="/okroshka-s-myasom-govyadiny-recept-okroshka-s-govyadinoi-video-recept.html">Рецепт окрошка с говядиной</a></li> </ul></aside> </div> </div> </div> </div> </div> <style type="text/css" media="screen"> /* custom css theme panel */ .icons img { display: inline-block; vertical-align: middle; } .menu-item-2892 { background-color: #d12d11; } /*.menu-item-798 { */ /* background-color: #fba52a;*/ /*} */ /*.menu-item-2383 { */ /* background-color: #fffff;*/ /*} */ /*.menu-item-2383 a { */ /* background-color: #000000;*/ /*} */ .woocommerce-loop-product__title { line-height: 18px; } </style> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/bbpress/templates/default/js/editor.js?ver=2.5.14-6684'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=4.9.1'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.70'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js?ver=2.1.4'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=3.2.5'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js?ver=3.2.5'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/wp-polls/polls-js.js?ver=2.73.8'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/themes/Newsmag/js/tagdiv_theme.js?ver=3.2'></script> <script type='text/javascript' src='/wp-includes/js/wp-embed.min.js?ver=4.9.1'></script> <script type='text/javascript' src='https://stomatp22.ru/wp-content/plugins/js_composer/assets/js/dist/js_composer_front.min.js?ver=4.12.1'></script> <script> (function() { var html_jquery_obj = jQuery('html'); if (html_jquery_obj.length && (html_jquery_obj.is('.ie8') || html_jquery_obj.is('.ie9'))) { var path = '/wp-content/themes/Newsmag/style.css'; jQuery.get(path, function(data) { var str_split_separator = '#td_css_split_separator'; var arr_splits = data.split(str_split_separator); var arr_length = arr_splits.length; if (arr_length > 1) { var dir_path = '/wp-content/themes/Newsmag'; var splited_css = ''; for (var i = 0; i < arr_length; i++) { if (i > 0) { arr_splits[i] = str_split_separator + ' ' + arr_splits[i]; } //jQuery('head').append('<style>' + arr_splits[i] + '</style>'); var formated_str = arr_splits[i].replace(/\surl\(\'(?!data\:)/gi, function regex_function(str) { return ' url(\'' + dir_path + '/' + str.replace(/url\(\'/gi, '').replace(/^\s+|\s+$/gm, ''); }); splited_css += "<style>" + formated_str + "</style>"; } var td_theme_css = jQuery('link#td-theme-css'); if (td_theme_css.length) { td_theme_css.after(splited_css); } } }); } })(); </script> </body> </html>