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:             
Shrinking Logo on Scroll
See this code in use here: 
Submitted by: Donald McGuinn
Language: CSS

Make head transparent
This code for sure works on RENEW stacks, not sure about others
See this code in use here: 
Submitted by: therealmusician
Language: CSS

Make button text have no shadow
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Sticky Mobile Navbar
See this code in use here: 
Submitted by: tkeane
Language: CSS

Left align logo in header in a stacked layout
See this code in use here: 
Submitted by: Karen Cooper
Language: CSS

Right align logo in Header in stacked layout
See this code in use here: 
Submitted by: Karen Cooper
Language: CSS

Add word ‘Menu’ after hamburger icon – Updated Oct 2016
Note: It is possible when copying directly from and inserting directly to your Styles sheet the quotation marks around Menu may need to be replaced. At least that made the code work for me. Rick M
See this code in use here: 
Submitted by: Karen Cooper
Language: CSS

Replace hamburger icon with word ‘Menu’ UPDATED: 16th Oct 2016
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Default X-theme breaking points

Note that you don't need media queries to hide individual elements in Cornerstone. You can use these classes. Just add them to elements, columns, rows... To hide on more widths, you can combine classes with a space between them. Put them into the Class field.

(Since some people are marking this as "not working", it may be that they are pasting "x-hide-xs | 480 & smaller" instead of "x-hide-xs". Please make sure that you are pasting in the Class field of the element that you wish to hide, and only the class, not the pipe and the explanation.)

See this code in use here: 
Submitted by: Miroslav Meduric
Language: CSS

Yet Another Related Posts Plugin (YARPP) Template for XTheme
I am using YARPP for my site so I modified the default YARPP template to make it look more like the “Recent Posts” shortcode. 1. Use this code to replace the content of “yarpp-template-example.php” 2. Select “X Theme” as your YARPP template file. 3. Enjoy 🙂
See this code in use here: 
Submitted by: romanlif
Language: PHP