Skip to content

Instantly share code, notes, and snippets.

@JoeHana
JoeHana / index.html
Created August 27, 2012 23:58
Those Form Checkboxes are made only with jQuery (without further plugins). The needed markup consists only of a input:checkbox and a label. The Rest is done via CSS and JS. The Goal was to have a custom solution which doesn't rely on a plugin, can be cus
<div class="wrapper">
<div class="description">
<p>the basic layout consist of a "input" (checkbox) and a "label". The "div" isn't mandatory, rather its only for demo purpose</p>
<br />
<p>the checkboxes are only visible for demo purposes and can be hidden.</p>
</div>
<div class="field-wrap">
<input type="checkbox" id="checkbox-photos" />
<label>Photos</label>
@JoeHana
JoeHana / index.html
Created November 30, 2012 05:25
A CodePen by Joe Hana. Simple Accordion - This is a simple Accordion made only with jQuery
<div class="wrapper">
<div class="container">
<div class="description">
<h1>Simple Accordion w/ jQuery</h1>
<p>This is a simple Accordion made only with jQuery</p>
<p>Version: 0.2</p>
<br/>
<h3>Key Features</h3>
<ul>
@JoeHana
JoeHana / index.html
Created November 30, 2012 05:37
A CodePen by Joe Hana. Loading - Simple CSS loading animation.
<div id="load">
<div>L</div>
<div>O</div>
<div>A</div>
<div>D</div>
<div>I</div>
<div>N</div>
<div>G</div>
</div>
@JoeHana
JoeHana / wpcasa-functions.php
Last active December 12, 2015 09:39
This Code can be added to the functions.php of the Theme (Child Theme) or to wpCasa Functions Plugin.
<?php
/**
* Custom Order Options
*/
add_filter('wpcasa_property_archive_title_order_args', 'custom_property_archive_title_order_args');
function custom_property_archive_title_order_args($args) {
@JoeHana
JoeHana / wpcasa-functions.php
Last active December 12, 2015 09:39
Adds the possibility to have post-type independent read more text labels
<?php
/**
* Custom more text depending on post type
*/
add_filter('wpcasa_more_text', 'custom_more_text');
function custom_more_text($text) {
@JoeHana
JoeHana / Custom Price Labels
Last active December 12, 2015 09:39
Adds the possibility to have custom price labels
/**
* Custom Price Labels
*/
add_filter( 'wpcasa_get_price_labels', 'custom_price_labels' );
function custom_price_labels($property_price_labels) {
$property_price_labels = array(
'sold' => __( 'SOLD', 'wpcasa' ),
'rented' => __( 'RENTED', 'wpcasa' ),
@JoeHana
JoeHana / Custom Numbers for Search Results
Last active December 14, 2015 09:08
This code modifies the numbers in the selection for the search results (search form) - originally they're set to 10,20,30,40,50,60.
/*
* Custom Numbers for Search Results
*/
add_filter('ts_nr_options', 'custom_nr_options');
function custom_nr_options($args) {
$args = array('12','24','36','48','60');
return $args;
@JoeHana
JoeHana / wpcasa-functions.php
Last active December 15, 2015 09:09
Change dots and commas in price to '
<?php
/**
* Change dots and commas in price to ‘
*/
add_filter( 'wpcasa_property_price', 'custom_property_price' );
function custom_property_price( $price ) {
@JoeHana
JoeHana / wpcasa-functions.php
Last active December 15, 2015 09:29
Fixing Captcha Issue
<?php
/**
* Fixing Captcha Issue
*/
add_filter( 'wpcasa_property_contact_fields', 'custom_property_contact_fields', 11 );
function custom_contact_fields( $contact_fields ) {
$contact_fields['captcha']['font']='./AHGBold.ttf';
@JoeHana
JoeHana / wpcasa-functions.php
Last active December 15, 2015 10:59
Enable comments on properties
<?php
/**
* Enable comments on properties post type
*/
add_filter('wpcasa_post_type_args_property', 'custom_post_type_args_property');
function custom_post_type_args_property($args) {
$args['supports'] = array( 'title', 'editor', 'author', 'thumbnail', 'custom-fields', 'revisions', 'excerpt', 'comments' );