Skip to content

Instantly share code, notes, and snippets.

View sagarjadhav's full-sized avatar

Sagar Jadhav sagarjadhav

  • rtCamp Inc
  • Pune
View GitHub Profile
@sagarjadhav
sagarjadhav / ajax-script.js
Created April 5, 2013 11:36
WordPress with ajax
/* Ajax Page Setup */
$page = jQuery('.link a');
$page.on('click', function (e) {
e.preventDefault();
var pageID = jQuery(this).attr('data-id');
var ajaxdata = {
action: 'load_pages',
page_id: pageID
};
@sagarjadhav
sagarjadhav / media-taxonomy.php
Last active December 15, 2015 10:28
Media Taxonomy Support
<?php
/**
* Registers Taxonomies
*
* @since rtPanelChild 1.0
*/
function rtp_create_taxonomies() {
/* Post Custom Taxonomy */
@sagarjadhav
sagarjadhav / gallery-slideshow.php
Last active December 15, 2015 03:29
Convert Gallery into Cycle Slideshow.
@sagarjadhav
sagarjadhav / child-menu-pages.php
Created March 5, 2013 09:19
Get Child pages of page according to their menu order in nav menu
<?php
/**
* Get Child pages of page according to their menu order in nav menu
*
* @return array ids of child pages order by their order in menu. FALSE on failure.
*/
function get_menu_child_pages() {
$menu_id = 0;
$current_page_id = get_the_ID();
$child_menu_list = '';
@sagarjadhav
sagarjadhav / super-sized.css
Created February 13, 2013 10:25
Super-sized background Image
img {
height: auto;
left: 0;
min-height: 100%;
position: fixed;
top: 0;
width: 100%;
}
@sagarjadhav
sagarjadhav / contact-form-7.html
Last active September 9, 2016 14:01
Contact Form 7 Markup with Sass
<!-- Misc Form -->
<div class="rtp-form-field"><label for="your-name">Your Name <span class="required">*</span></label>[text* your-name id:your-name]</div>
<div class="rtp-form-field"><label for="contact-email">Email <span class="required">*</span></label>[email* email id:contact-email]</div>
<div class="rtp-form-field"><label for="company-name">Company Name <span class="required">*</span></label>[text* company-name id:company-name]</div>
<div class="rtp-form-field"><label for="street-address">Street Address</label>[text street-address id:street-address]</div>
<div class="rtp-form-field"><label for="apartment-suite">Apartment/Suite</label>[text apartment-suite id:apartment-suite]</div>
<div class="rtp-form-field"><label for="city">City</label>[text city id:city]</div>
<div class="rtp-form-field"><label for="state">State</label>[text state id:state]</div>
<div class="rtp-form-field"><label for="zip">Zip <span class="required">*</span></label>[text* zip id:zip]</div>
<div class="rtp-form-field"><label for="pho