Skip to content

Instantly share code, notes, and snippets.

@jenhuls
jenhuls / _flexbox.scss
Created March 26, 2022 12:49 — forked from francajosejunior/_flexbox.scss
SCSS helpers
// Flexbox Mixins
@mixin flexbox {
display: -webkit-box;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
}
@jenhuls
jenhuls / even_odd_display_repeater_acf_WP.php
Created December 17, 2020 20:04 — forked from loorlab/even_odd_display_repeater_acf_WP.php
Even / Odd Display with Repeater ACF Field - WordPress
<div class="level customers level-wrapper">
<ul class="categories">
<?php if( have_rows('items_page_block') ): ?>
<?php while( have_rows('items_page_block') ): the_row();
// vars
$image_item_block = get_sub_field('image_item');
$title_item_block = get_sub_field('title_item');
$text_item_block = get_sub_field('text_item');
if( get_row_index() % 2 == 0 ){ ?>
@jenhuls
jenhuls / wordpress-hardening-techniques.md
Last active July 26, 2021 14:38 — forked from tlongren/wordpress-hardening-techniques.md
[WordPress Hardening] #WordPress #htaccess

Hardening WordPress

Securing WordPress using a combination of configuration changes and plugins.

.htaccess and wp-config.php tasks

1. Add keys to wp-config.php

2. Hide .htaccess and wp-config.php

<Files .htaccess wp-config.php>
@jenhuls
jenhuls / shortcode-copyright.php
Last active April 8, 2021 13:58 — forked from schlessera/shortcode-copyright.php
[Shortcode to display copyright notice with current year] Mostly used with builder plugins #WordPress #shortcode
@jenhuls
jenhuls / .htaccess
Last active July 26, 2021 14:26 — forked from ScottPhillips/.htaccess
[Common WP .htaccess Redirects] #WordPress #htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@jenhuls
jenhuls / slick-slider-prev-next.css
Last active December 28, 2020 19:30 — forked from leadbellydesign/slick-slider-prev-next.css
[Styling Previous and Next buttons in Slick Slider with Font Awesome Icons] #slickjs
/* Must include Font Awesome (here: https://fortawesome.github.io/Font-Awesome/get-started/) for icons to show up */
.slick-prev,
.slick-next {
font-size: 0;
position: absolute;
bottom: 20px;
color: #d5122f;
border: 0;
background: none;
@jenhuls
jenhuls / jquery.email-antispam.js
Last active October 22, 2020 11:21 — forked from mathiasbynens/jquery.email-antispam.js
[Simple spam protection] for email addresses using #jquery
/* Simple spam protection for email addresses using jQuery.
* Well, the protection isn’t jQuery-based, but you get the idea.
* This snippet allows you to slightly ‘obfuscate’ email addresses to make it harder for spambots to harvest them, while still offering a readable address to your visitors.
* E.g.
* <a href="mailto:foo(at)example(dot)com">foo at example dot com</a>
* →
* <a href="mailto:[email protected]">[email protected]</a>
*/
$(function() {