Answer the question
In order to leave comments, you need to log in
How to find out: is there a piece of the phrase in the link?
Hello! There is an online store on wordpress. The $cat_link variable can contain links like
http://domen/product-category/name-category/yamaha-lodki/
$cat_slug = yamaha-lodki;
if($cat_link==$cat_slug) {..}
Answer the question
In order to leave comments, you need to log in
if (strpos($cat_link, $cat_slug) !== false) {
// найдено, что-то сделать
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question