A Quick Way to Change Content Based on Selected Language in OpenCart

Here’s the quick php code to deliver different content based on site’s language currently selected in Open Cart Shop template.
Continue reading

Posted in Templates | Tagged | Leave a comment

Make Site Elements FadeIn on Page While Loading

Now we can load elements of site’s layout using CSS transition effects and a small javascript code.
Continue reading

Posted in Templates | Tagged | Leave a comment

Change Woocommerce Lightbox Links to Another Image Size Link Instead of Full Size

I’ve found it important to have Woocommerce product page main image and more images gallery to link to a “large” image size instead of a full size. This images are opening in prettyPhoto lightbox.

I often advice to clients to add some watermark to lightbox images in full size. But if we add a watermark to the full size image and then regenerate all image sizes, watermark will be inserted to all image thumbnails. This way we can preserve the original full size image, so if we change a watermark or will need to remove it, we’ll have a backup.
Continue reading

Posted in WordPress | Tagged | 6 Comments

Add Category Class to Body Classes of Woocommerce for Single Product Page

To change a design of single product page for some particular category of products on Woocommerce shop I often need this code to be put into functions.php of my WordPress child theme.
Continue reading

Posted in WordPress | Tagged | 2 Comments

Replace “Add to Cart” Button in Products Category List With a Link to Single Product Page in Woocommerce

Woocommerce WordPress shop categories display different types of products with different buttons, like Select Options, More Info and Add to Cart. I wanted to have all this buttons to be the same, something like “More Info”. This can be done from functions.php of my child theme.
Continue reading

Posted in WordPress | Tagged | 15 Comments

Add Last Modified Date of Post Update in TwentyThirteen WP Child Theme

Latest theme for WordPress called TwentyThirteen is nice, but still doesn’t have Last Modified date in post meta. “Last Modified” date is required by Google to get an enhanced listing in search results.  This requirements can be tested in Structured Data Testing Tool.
Continue reading

Posted in WordPress | Tagged | 1 Comment

Remove Additional Line Spacing Added Because of <sup> Superscript HTML Tag

Superscript <sup> tags in HTML can make line spacing all different in a text. A line of CSS will make <sup> tags unobtrusive.
Continue reading

Posted in CSS CheatSheets | Tagged | 1 Comment

Add Missing .woocommerce Class And Other Classes to Pages Used by WooCommerce

When changing WooCommerce templates and adding more functionality to a shop I found that some pages used by WooCommerce do not have a basic .woocommerce class on page’s <body>, as well as some layout classes, like .product-columns-3 were missing. This is resulted in a wrong rendering of my CSS. Here’s the way how to add such classes to all pages.
Continue reading

Posted in WordPress | Tagged | 1 Comment

Allow Markup in WordPress Category Descriptions

HTML tags get stripped in category descriptions in WordPress by default. There are some plugins to enable rich text editing or just to get back to HTML formatting in description texts. But simple code addition to theme’s (or child theme) functions.php can resolve this issue. This also will be valid for a WooCommerce shop products categories.
Continue reading

Posted in WordPress | Tagged | 1 Comment

Make YouTube prettyPhoto Lightbox Larger From a Link

prettyPhoto plays YouTube clips in a standard size. But how to make it play a movie in larger size?
Continue reading

Posted in Image Galleries | Tagged | 1 Comment

Enable prettyPhoto Lightboxes from Woocommerce to the whole WordPress site

Woocommerce is a popular e-commerce plugin for WordPress. It has a prettyPhoto excellent lightbox option for products display. Remember to enable lightbox option for products display in woocommerce plugin settings, otherwise it will not work. When you want to enable that lightbox all over your wordpress site, just add the following code to your child theme functions.php
Continue reading

Posted in Templates, WordPress | Tagged | 13 Comments

WordPress Themes Using CSS and XTHML

WordPress Poker themes are currently in demand, probably because of the rise of international poker stages like the World Poker Tour and the World Series of Poker. Aside from poker tournaments, another factor that gave rise to its demand is the emergence of convenient poker websites.
Continue reading

Posted in Templates | Tagged | Leave a comment