Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What do you mean
I(t) doesn’t work
?
Elaborate.
the one line mixes strings and php;
try and rewrite it to:
echo '<div class="column-sidebar nomargin">'; do_action('shop_sidebar'); echo '</div>';
btw: that is alot of closing divs in the output of that function – are you sure that results in valid html code?
Thread Starter
dyyyb
(@dyyyb)
Yes, my theme contain a few divs 🙂 And that function is for wrapping a specific plugin – Jigoshop. My sidebar is in this particular place and i had to place it somehow there.
Thank You alchymyth! It works like a charm 😉
Hi,
You can use the following code:
var url = “http:\\Google.com”
if(url.indexOf(url) !=
-1)
{
//it means url contains Google word.
}
indexOf returns the position of the word in the string. If not found, it will return -1
Regards,
[signature moderated]