Sometimes you may want to add a contact form 7 form into a template directly. While normal use is via a shortcode eg, you can’t use this directly inside a PHP page template. Instead, you need to wrap this inside the WordPress do_shortcode function, in order to enable it to parse correctly. Wrapping your form … Continued
Why use your own bandwidth when you can use Google’s own! This snippet ensures your WordPress website correctly calls the Google jQuery library direct from Google for speed, security and reliability: NB: Just make sure you use the above with… …in your header file, or wherever your wp_head scripts get called from.
This little snippet removes the admin bar permanently from all users while logged in and viewing the website from the front-end. Personally, I never use it and always turn it off with this little snippet.
Hackers and bots are more prevalent than ever. It is vitally important you protect your WordPress install from every type of potential attack. One simple way hackers attempt to get into your install is via the login form. Most people stick with ‘admin’ as the default username for their admin account. This is bad. Already, … Continued
If you want to display some latest products if your Woocommerce store in another template file, add this to achieve just that!
I created a members dashboard area on a site recently and needed a custom login page which used the Woocommerce login form to log users into the site. If successful, I wanted them to be redirected to another front-end page. This handy little snippet goes into your functions.php file and allows you to redirect pretty … Continued
Here’s a little snippet which remove the orderby dropdown on product archive pages. Add this to your functions.php file:
I needed to target a particular parent menu and add an additional class to the sub-menu ul element. As WordPress builds the menu, you won’t find it in any theme files. Also, I didn’t want to add this globally as the site I was working on was responsive and I shared the same class on … Continued
More and more, I see websites with large image backgrounds that completely fill the screen size. I really like these and here’s how to achieve it simply using CSS: That’s it! Obviously you need to change the Div name and background image/path to suit but you’re good to go.