Code Snippets

The quickest way to use this section is to search using a search term.

Have you contributed your favorite snippets yet? Check your submissions using the link attached to your welcome message in the header.

Snippets include php, javascript or css code to help customise your site. If you wish to add some helpful bits of code you can submit it here for review. All contributions welcome!

Language:           Keyword:             
Footer Background Image
See this code in use here: 
Submitted by: Donald McGuinn
Language: CSS

Border on Bottom of Navigation
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Add Shadow to Text
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Add Code to Header in X Theme
Add the following code to the functions.php file of your child theme.
See this code in use here: xtheme.kcgdemo.com
Submitted by: XAdmin
Language: PHP

Add Code to Footer in X Theme
Add the following code to the functions.php file of your child theme.
See this code in use here: 
Submitted by: XAdmin
Language: PHP

Inline Footer Images
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Hidden Email Addresses

Add this code to your javacript editor:

The class used in the link script 'hiddenemail' is there so you can style the link with CSS how you choose (should you choose).

This has been tested on Renew and works. It should work on all X Stacks. That said if you make changes to the code it may not work as expected.

See this code in use here: 
Submitted by: XAdmin
Language: JavaScript

Remove Menu Underlines
Add to customiser not css editor
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Remove Menu Oval Outlines – Icon Stack
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Skew a section and keep the content straight
Add class skew-box to the section, and place the CSS in the Cornerstone CSS editor if you use it only on one page, or place it in the Child theme's style.css if you use it site-wide. This method targets all direct children of the section (rows) to revert them back. Check if margin 2% needs adjusting in your case. Note that lines may look jagged when skewed. To avoid this, add a border the same color as the neighboring section above and below the skewed section, like this; border-top: 1px solid white; border-bottom: 1px solid white; (add the borders to the style-box of the skewed section). (Thanks Robert Mongomery for the smoothing tip).
See this code in use here: 
Submitted by: Miroslav Meduric
Language: CSS