This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function simple_copyright () { | |
return "© " . get_bloginfo('name') ." ". date("Y"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function auto_copyright() { | |
global $wpdb; | |
$copyright_dates = $wpdb->get_results(" | |
SELECT | |
YEAR(min(post_date_gmt)) AS firstdate, | |
YEAR(max(post_date_gmt)) AS lastdate | |
FROM | |
$wpdb->posts | |
WHERE | |
post_status = 'publish' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Bloginfo Shortcode | |
* Description: Allows bloginfo() as a shortcode. | |
* Author: Giuseppe Mazzapica | |
* Author URI: http://gm.zoomlab.it | |
* License: MIT | |
* @link: http://wordpress.stackexchange.com/questions/173871/how-to-display-the-site-name-in-a-wordpress-page-or-post | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create own product tabs and fields for editable Tab content with plugin ACF | |
* @Link: https://gist.github.com/webonaut/85622efe2b818e2d1442 | |
*/ | |
/// CREATE TABS | |
add_filter( 'woocommerce_product_tabs', 'oxx_product_detail_tab', 97 ); | |
function oxx_product_detail_tab( $tabs ) { | |
// Adds the new tab "Details" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); | |
if ( is_woocommerce() || is_page('store') || is_shop() || is_product_category() || is_product() || is_cart() || is_checkout() ) { | |
wp_dequeue_style( 'woocommerce_frontend_styles' ); | |
wp_dequeue_style( 'woocommerce_fancybox_styles' ); | |
wp_dequeue_style( 'woocommerce_chosen_styles' ); | |
wp_dequeue_style( 'woocommerce_prettyPhoto_css' ); | |
wp_dequeue_script( 'wc_price_slider' ); | |
wp_dequeue_script( 'wc-single-product' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tgmsp_pre_load_slider', 'tgm_soliloquy_transform_to_gallery', 10, 5 ); | |
/** | |
* Circumvents the slider output and allows access to raw format. | |
* | |
* @param bool $bool Boolen if the filter should be run. Default is false. | |
* @param int $id The slider ID being filtered. | |
* @param array $images Array of images in the slider. | |
* @param array $data Array of meta for the slider. | |
* @param int $count The current number of the slider on page (if there is more than one on the page). | |
* @return bool|string False if you want to keep a slider, HTML output for something else. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Centering a Gravity Forms powered, MailChimp signup form. */ | |
#gform_wrapper_1 { margin: 0; padding: 0; } | |
#gform_wrapper_1 #gform_1 { text-align: center; width: 100%; } | |
#gform_wrapper_1 .gform_body, | |
#gform_wrapper_1 .gform_footer { clear: none; display: inline-block; margin: 0; padding: 0; vertical-align: bottom; } | |
#gform_wrapper_1 .gform_body { width: 70%; } | |
#gform_wrapper_1 .gform_footer { margin-left: -5px; width: auto; } | |
#gform_wrapper_1 .gform_footer input { padding: 10px 22px; } | |
#gform_wrapper_1 #gform_1 ul li.gfield { margin-bottom: 0; padding: 0; } | |
#gform_wrapper_1 #gform_1 label.gfield_label+div.ginput_container { margin-top: 0; } |