If you have an SSL setup for the websites domain, it should be enforced for the wordpress admin login, and all admin pages (typically because the site has the SSL because of ecommerce). Add this contant definition to wp-config.php to force SSL on login and admin pages.
When developing a shopping cart using the shopp plugin, if you are testing a payment gateway that requires an SSL certificate, you can have difficulties fully testing the site. Add this constant to wp-config.php to disable SSL redirects on the checkout page: Just remember to remove it when the site is launched for production use.
I found this little snippet on Norcross blog. It will save me a lot of agreviation in the future with the anchor tags to the attachment page or media file.
During development and testing, you may need to reset the items in the cart, promo codes, shipping zip codes. To do this use the following variable in the url for the shop page: yourwebsite.com/shop/?shopping=reset
This css trick was applied to a website build where I needed background images tabs to overlay one another, so that the next tab’s z-index was lower than the first one causing the background image to be behind the one to the left of it. My first thought was to use :nth-child to assign the …
Add this snippet of code at the top of the page to display any errors that may be thrown. Be sure to remove this code before pushing out to a production environment. For wordpress specific sites, the following code is useful in the wp-config.php file if you are trouble shooting a live site, and don’t …
I’ve found this function to be the most accurate for calculating a persons age (knowing their birthdate). Source: http://spyk3lc.blogspot.com/2012/03/php-get-age-comparison-results-of-3.html
The following functions are useful especially when pull an rss feed from a remote site, and you want to display the first image in the post. returnImage() will return the first entire image tag, which can then be passed to scrapeImage to return just the image source.
Adding this code to the functions.php file will append the class “last” to the last li tag outputed by wp_nav_menu. Very useful for when you need to style the last link in a drop down menu different from the others, or to remove that a separate after the last link in a horizontal menu.