Securing WordPress using a combination of configuration changes and plugins.
1. Add keys to wp-config.php
<Files .htaccess wp-config.php>
// Flexbox Mixins | |
@mixin flexbox { | |
display: -webkit-box; | |
display: -webkit-flex; | |
display: -moz-flex; | |
display: -ms-flexbox; | |
display: flex; | |
} |
<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 ){ ?> |
Securing WordPress using a combination of configuration changes and plugins.
wp-config.php
<Files .htaccess wp-config.php>
<?php | |
/** | |
* Shortcode to display copyright notice with current year | |
* @author Alain Schlesser ([email protected]) | |
* usage: <?php echo do_shortcode('[copyright]'); ?> | |
*/ | |
function as_shortcode_copyright() { | |
// generate output in the form of "(C) 2015 Greatest Blog Ever" |
#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/ |
/* 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; |
/* 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() { |