Skip to content

Instantly share code, notes, and snippets.

@AnnaCrumina
AnnaCrumina / custom.js
Last active August 29, 2015 14:19 — forked from crumina/custom.js
jQuery(document).ready(function () {
setTimeout(function() {
if (window.location.hash) {
jQuery('.accordion dd > a').each(function () {
var current = jQuery(this).parents('.accordion');
var hash = '#' + jQuery(this).attr('href').split('#')[1];
if (hash == window.location.hash) {
current.find('dd').removeClass('active');
current.find('.content').hide();
jQuery(this).parent().addClass('active');
@AnnaCrumina
AnnaCrumina / gist:391f0397bc1ae4bbc802
Last active August 29, 2015 14:19
Onetouch - add shortcode before header menu
<?php
function custom_before_header_bar()
{
if (is_home() || is_front_page()) {
?>
<div class="row">
<div class="large-12 small-12 columns">
<?php
// Unhook default Crumina functions
function unhook_crumina_functions() {
remove_filter( 'woocommerce_product_tabs', 'crum_remove_product_tabs', 98 );
}
add_action( 'init', 'unhook_crumina_functions' );
<?php
function _remove_meta_from_posts() {
remove_action('reactor_post_header', 'reactor_do_post_header_meta', 3);
}
add_action( 'init', '_remove_meta_from_posts', 1 );
<?php
function cr_custom_header_titles() {
if ( is_single() ) { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } else { ?>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __('%s', 'crum'), the_title_attribute('echo=0') ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php }
}
<?php
/* -------------------------------------------------------
You can add your custom functions below
-------------------------------------------------------- */
/*--------------------------------------------------------
Custom VCard Widget
--------------------------------------------------------*/
/**
* Pages without top menu
* in footer.php
*
* @since 1.0.0
*/
function reactor_remove_footer() {
if (is_page_template('page-blank.php')):
<?php
function custom_before_header_bar()
{ ?>
<div style="background:gray; "> <!-- Full width row -->
<div class="row"><div class="large-12 small-12 columns">
<!-- Your Content Will be here -->
</div></div>
function cr_custom_do_reactor_head()
{
global $one_touch_option; ?>
<meta charset="utf-8"/>
<title><?php wp_title(); ?></title>
<!-- google chrome frame for ie -->
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
add_action('init','crum_remove_post_share');
function crum_remove_post_share(){
remove_action('reactor_post_footer', 'reactor_share_post', 6);
}
add_action('reactor_post_footer', 'crumina_custom_post_share', 6);
function crumina_custom_post_share(){
if ( is_single() ) {