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:             
Change Custom Headline Accent Color
See this code in use here: 
Submitted by: Martin Mosley
Language: CSS

Add Menu for pages in Cornerstone Admin Bar
Add this code to your functions.php in your child theme.
See this code in use here: 
Submitted by: XAdmin
Language: PHP

Open an Accordion list item from a link (Updated 2nd Jan 2017)

If you want to open an accordion list item from a link on a different page, ADD this to Appearance > Customize > Custom > Edit Global Javascript:

Then your links should look like http://www.YOURDOMAIN.COM/YOUR-PAGE/#faq1. List items are numbered from top down 1 2 3 4 etc, target the one you want to have open by changing the 2 to suit.

Live working example Scroll down to the FAQs and try them out.

See this code in use here: 
Submitted by: Rick M
Language: JavaScript

Add Social / any Icons to Nav Bar
Go to APPEARANCE > MENUS then scroll down and click on Custom Links and add the appropriate URL for your Social Link Add this code to the Navigation Label Box.
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Insert Bullets into Nav Bar between Menu links, with no link / hover state
Add this CSS to your Child Theme style.css
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Change Font Size in Social Sharing Element
Add this CSS to your Child Theme style.css file.
See this code in use here: 
Submitted by: XAdmin
Language: CSS

Change hover text on Social Sharing Shortcode
Adding this PHP code to your Child Themes functions.php file will allow you to change the hover text when you are using the Social Sharing Shortcodes. IMPORTANT: For GoDaddy users, you may have to disable the mu-plugins folder located in your /wp-content folder on your server. In order to do this, rename the folder mu-plugins.bak. This will disable the caching system and other management control that GoDaddy has for your server. Continue at your OWN RISK. Please be sure to BACKUP your website before changing any files.
See this code in use here: 
Submitted by: XAdmin
Language: PHP

Remove Border and Padding from Posts Featured Image
Add this CSS to your Child Theme style.css file This will also remove the blue line that appears on smaller screen sizes. If you do not want to do this, remove the body from the css
See this code in use here: 
Submitted by: Martin Mosley
Language: CSS

Nav over Revolution Slider
See this code in use here: 
Submitted by: ImpulseDev
Language: CSS

Remove Arrows from Nav Bar Links
Add this CSS to your Child Theme Styles.css file
See this code in use here: 
Submitted by: XAdmin
Language: CSS