Skip to content

Instantly share code, notes, and snippets.

@purethemes
purethemes / functions.php
Last active December 16, 2015 05:08
Using new Media Uploader in Option Tree for gallery. Credits for idea how to handle it to shibashake.com. Thanks!
<?php
function ot_type_puregallery( $args = array() ) {
/* turns arguments array into variables */
extract( $args );
global $post;
$current_post_id = $post->ID;
/* verify a description */
$has_desc = $field_desc ? true : false;
<?php
/**
* Template Name: Page with comments
*
* The "Template Name:" bit above allows this to be selectable
* from a dropdown menu on the edit page screen.
*
* @package WordPress
* @subpackage purepress
* @since purepress 1.0
We create beautiful, usable, professional websites using best practice accessibility and the latest W3C web standards guidelines, resulting in semantic and seo friendly XHTML and CSS. If you’re interested in our services, please send us a message through the form below.
[column width="twelve" place="first" ] [headline htype="h4"]Contact Form[/headline]
[contact-form-7 id="285" title="Contact"] [/column]
[column width="four" place="last" custom_class="google-map"] [headline htype="h4"]Our Location[/headline]
[googlemap width="100%" height="250px" address="New York"]
[headline margin="low-margin"]Social [/headline] [social_icons] [social_icon service="facebook"] [social_icon service="evernote"] [social_icon service="linkedin"] [social_icon service="googleplus"] [/social_icons] [/column]
#navigation .menu > li.current-menu-parent, #navigation .menu > li.current-menu-ancestor, #navigation .menu > li.current_page_parent, #navigation .menu > li.current-menu-item { background-color: GREEN_COLOR; }
.top-bar-dropdown ul li a:hover, .skill-bar-value, .counter-box.colored, a.menu-trigger:hover, .pagination .current, .pagination span.current,
.pagination ul li a:hover, .pagination-next-prev ul li a:hover, .tabs-nav li.active a, body .wpb_content_element .wpb_tour_tabs_wrapper .wpb_tabs_nav .ui-tabs-active a,
.dropcap.full, .nav-next:hover, .nav-previous:hover, .highlight.color, .ui-accordion .ui-accordion-header-active:hover, .ui-accordion .ui-accordion-header-active,
.wpb_column > .wpb_wrapper .trigger.active a, .trigger.active a, .trigger.active a:hover, .share-buttons ul li:first-child a, a.caption-btn:hover,
.mfp-close:hover, .mfp-arrow:hover, .img-caption:hover figcaption, #price-range .ui-state-default, .page-numbers.current, .selectricItems li:hover,
.product-categories .img-caption:hover
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Nevia
p.demo_store {
position:fixed;
top:0;
left:0;
right:0;
margin:0;
width:100%;
font-size:1em;
padding:.5em 0;
text-align:center;
[box type=notice]If you're looking for service which isn't listed below, please send us a message![/box]
[column width="eleven" place="first" ] [headline htype="h4"]Methodology[/headline]
Donec rutrum erat non arcu gravida porttitor. Nunc et magna nisi.Aliquam at erat in purus aliquet mollis. Fusce elementum velit vel dolor iaculis egestas. Maecenas ut nulla quis eros scelerisque posuere vel vitae nibh. Proin id condimentum sem. Morbi vitae dui in magna vestibulum suscipit vitae vel nunc.
Nunc et rutrum consetetur sadipscing elitr, sed diam nonumy at volutpat. Sed consectetur suscipit lorem nunc.adipiscing elit. Integer commodo tristique odio, quis fringilla ligula aliquet ut. Maecenas sed justo varius velit imperdietAliquam at erat in purus aliquet mollis. Fusce elementum velit vel dolor iaculis egestas.
[/column] [column width="five" place="last" ] [headline htype="h4"] Features [/headline] [list type=check_list]
<ul>
<?php
/**
* Template Name: Home Page Template
*
* A custom page template without sidebar.
*
* The "Template Name:" bit above allows this to be selectable
* from a dropdown menu on the edit page screen.
*
* @package WordPress
<?php if(ICL_LANGUAGE_CODE == "en") { ?>
<h2>
<a class="current homepage" id="current" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img src="PATH TO ENGLISH LOGO" alt="<?php esc_attr(bloginfo('name')); ?>"/>
</a>
</h2>
<?php } ?>
<?php if(ICL_LANGUAGE_CODE == "de") { ?>
<h2>
Version 2.4
* fixes for WooCommerce 2.1.2
* Envato Toolkit
* latest Option Tree
* default font updated to Open Sans
Version 2.0.9
* sidebar left/right on product page
* option tree update