Hide menu item in Wordpres Nav if logged in

Something we’ve come across lots of times in WordPress is how to hide a specific menu item in WordPress menus if the user is logged-in, or indeed logged out. A common application for this would be if you have a registration page which you obviously don’t want to continue to show if the user has already registered (they are logged …

jQuery Replace Specific Text

Sometimes you may want to replace the text in a specific div or element with something else. For example you are using an off the shelf script and don’t want to edit the core files, but it doesn’t meet your specific needs or brand. The following is a very simple jQuery snippet that replaces specific text with something else:-  

jQuery remove empty p tags

In content management systems like WordPress we often find that the system auto-generates <p></p> tags. That’s a real annoyance as it adds empty space amongst layouts. Here’s a simple jQuery snippet we often use to remove this:- In our example we are targeting “.entry-content’, but this can be applied to any div. Let us know how you get on.