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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Display a custom favicon | |
add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' ); | |
function sp_favicon_filter( $favicon_url ) { | |
//return 'http://www.mydomain.com/wp-content/themes/genesis-childtheme/images/favicon.ico'; | |
//favicon via image-url(SSL/HTTPS). | |
return 'https://cdn4.iconfinder.com/data/icons/geomicons/32/672410-skull-16.png'; | |
} |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
add_action( 'wp_enqueue_scripts', 'custom_load_uikit' ); | |
/** | |
* Load UIKit. | |
*/ | |
function custom_load_uikit() { | |
wp_enqueue_style( 'uikit', '//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/css/uikit.min.css' ); |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
// Load Font Awesome// | |
// Register Style, Codex version | |
function custom_styles() { | |
wp_register_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', false, '4.1.0' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_styles' ); |
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 | |
//* Do NOT include the opening php tag shown above. | |
add_action( 'wp_enqueue_scripts', 'custom_load_bootstrap' ); | |
/** | |
* Enqueue Bootstrap. | |
*/ | |
function custom_load_bootstrap() { | |
wp_enqueue_style( 'bootstrap-css', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css' ); | |
wp_enqueue_script( 'bootstrap-js', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true ); |
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 the following in your child theme’s functions.php | |
add_filter( 'comment_form_default_fields', 'comment_form_custom_fields' ); | |
/** | |
* Remove Email and Website fields in comment form. | |
* | |
* @param array $args Default comment form arguments | |
* @return array Modified comment form arguments | |
*/ | |
function comment_form_custom_fields( $args ) { |
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
//* Enque and make Font Awesome available | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css' ); | |
} |
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
/** | |
* remove on single product panel 'Additional Information' since it already says it on tab. | |
*/ | |
add_filter('woocommerce_product_additional_information_heading', 'isa_product_additional_information_heading'); | |
function isa_product_additional_information_heading() { | |
echo ''; | |
} |
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 | |
// THIS VERSIN IS ONLY FOR GENESIS FRAMEWORK // | |
// Add Google Tag Manager code in <head> | |
add_action( 'wp_head', 'sk_google_tag_manager1' ); | |
function sk_google_tag_manager1() { ?> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
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
This creates a custom SEO function for meta description. | |
The function automatically create (155 words) Meta Description From Content. | |
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 woo_seo_noindex_special_pages () { | |
global $post; | |
$woocommerce_pages = array('cart', 'checkout', 'order-received', 'order-tracking', | |
'my-account', 'logout', 'lost-password', 'mijireh-secure-checkout'); | |
$slug = get_post($post)->post_name; | |
if (in_array($slug, $woocommerce_pages)) { | |
echo '<meta name="robots" content="noindex,follow"/>' . "\n"; | |
} |
OlderNewer