Allow Iframe but restrict direct access
RewriteEngine On
RewriteCond %{HTTP_REFERER} !example.net
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/protected
RewriteRule . – [F]
//Custom Header function sample_genesis_do_header() { global $wp_registered_sidebars; if ( ( isset( $wp_registered_sidebars[‘header-right’] ) && is_active_sidebar( ‘header-right’ ) ) || has_action( ‘genesis_header_right’ ) ) { genesis_markup( array( ‘html5’ => ‘ ‘, ‘xhtml’ => ‘ ‘, ‘context’ => ‘header-widget-area’, ) ); do_action( ‘genesis_header_right’ ); add_filter( ‘wp_nav_menu_args’, ‘genesis_header_menu_args’ ); add_filter( ‘wp_nav_menu’, ‘genesis_header_menu_wrap’ ); dynamic_sidebar( ‘header-right’ ); remove_filter( ‘wp_nav_menu_args’,…
Embed Youtube without an Iframe. It loads the thumbnail only, until a user clicks it, then it loads the Youtube player. Faster initial page load. Responsive. The JS: /* Responsive YouTube Embed */ /* Web: http://rooksadvertising.com */ document.addEventListener(“DOMContentLoaded”, function() { var div, n, v = document.getElementsByClassName(“youtube-player”); for (n = 0; n < v.length; n++) {…
.container { position:relative; } .absolute-center { position: absolute; left: 50%; /* horizontal alignment */ top: 50%; /* vertical alignment */ transform: translate(-50%, -50%); /* horizontal, vertical alignment fine tuning; explanation: http://stackoverflow.com/q/36817249 */ }
WordPress has tools to add a class to an LI element of a menu item. It also has tools to add a rel value to the anchor of a menu item But it does not have tools to add a class to the anchor element of a menu item. Let say I add a phone…
In Woocommerce > Includes > Widgets > class-wc-widget-products.php Add at line 70: ‘in_cat’ => array( ‘type’ => ‘text’, ‘std’ => __( ‘Category Number’, ‘woocommerce’ ), ‘label’ => __( ‘In Category’, ‘woocommerce’ ) ), Add at line 101: $cat = ! empty( $instance[‘in_cat’] ) ? sanitize_title( $instance[‘in_cat’] ) : $this->settings[‘in_cat’][‘std’]; Add at line 114: array( ‘taxonomy’…
// Move image above post title in Genesis Framework 2.0 remove_action( ‘genesis_entry_content’, ‘genesis_do_post_image’, 8 ); add_action( ‘genesis_entry_header’, ‘genesis_do_post_image’, 8 );