Hi! If you see an error or something is missing (like :focus-within
for few years :P) please let me know ❤️
Element -- selects all h2
elements on the page
h2 {
<?php | |
// This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker | |
// somewhere in your theme. | |
?> | |
<header class="banner navbar navbar-default navbar-static-top" role="banner"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span> |
// Edit order items table template defaults | |
function sww_add_wc_order_email_images( $table, $order ) { | |
ob_start(); | |
$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php'; | |
wc_get_template( $template, array( | |
'order' => $order, | |
'items' => $order->get_items(), | |
'show_download_links' => $show_download_links, |
/** | |
* Set a custom add to cart URL to redirect to | |
* @return string | |
*/ | |
function custom_add_to_cart_redirect() { | |
return 'http://www.yourdomain.com/your-page/'; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' ); |
// Load translation files from your child theme instead of the parent theme | |
function my_child_theme_locale() { | |
load_child_theme_textdomain( 'total', get_stylesheet_directory() . '/languages' ); | |
} | |
add_action( 'after_setup_theme', 'my_child_theme_locale' ); |
<?php | |
/** | |
* Redirect users to custom URL based on their role after login | |
* | |
* @param string $redirect | |
* @param object $user | |
* @return string | |
*/ | |
function wc_custom_user_redirect( $redirect, $user ) { | |
// Get the first of all the roles assigned to the user |
@font-face { | |
font-family: 'Your Custom Font'; | |
src: url('fonts/webfont.eot'); /* IE9 Compat Modes */ | |
src: url('fonts/webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
url('fonts/webfont.woff') format('woff'), /* Modern Browsers */ | |
url('fonts/webfont.ttf') format('truetype'), /* Safari, Android, iOS */ | |
url('fonts/webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
} |
// Add custom font to font settings | |
function wpex_add_custom_fonts() { | |
return array( 'My Custom Font' ); // You can add more then 1 font to the array! | |
} |
.element { | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} |
function my_assets() { | |
wp_register_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) ); | |
wp_enqueue_script( 'owl-carousel' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_assets' ); |