Skip to content

Instantly share code, notes, and snippets.

<?php get_header(); ?>
<div class="fl-content-full container">
<div class="row">
<div class="fl-content col-md-12">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php get_template_part('content', 'page'); ?>
<?php endwhile; endif; ?>
</div>
</div>
@bluedognz
bluedognz / shrink-row shadow.css
Last active July 14, 2017 14:30
CSS to apply a subtle drop shadow to the Beaver Themer fixed header
/** ADD A DROP SHADOW TO BEAVER THEMER HEADER SHRINK ROW **/
.fl-theme-builder-header-scrolled {
-webkit-box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2);
box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2);
}
@bluedognz
bluedognz / shrink-row hide.css
Last active July 14, 2017 15:43
Use this code to hide rows on scrolled state with the Beaver Themer. Assign bdw-hide-scrolled class name to the row or module you want hidden.
/** HIDE HEADER ROWS OR MODULES ON SCROLLED STATE **/
.fl-theme-builder-header-shrink .bdw-hide-scrolled {
display: none;
}
@bluedognz
bluedognz / microthemer
Last active July 27, 2018 10:40
Microthemer remove snippet
/* Begin Microthemer Code */
if (!defined('MT_IS_ACTIVE')) {
function add_microthemer_css() {
$p = get_option('preferences_themer_loader');
$mtv = '?mtv=' . (!empty($p['version']) ? $p['version'] : 1);
$mts = '?mts=' . (!empty($p['num_saves']) ? $p['num_saves'] : 0);
if (!empty($p['g_fonts_used'])){
$google_url = !empty($p['g_url_with_subsets']) ? $p['g_url_with_subsets']
: !empty($p['gfont_subset']) ? $p['g_url'].$p['gfont_subset'] : $p['g_url'];
$h = 'microthemer_g_font'; wp_register_style($h, $google_url, false); wp_enqueue_style($h);
@bluedognz
bluedognz / 127.0.0.1 lockout fix
Last active January 31, 2018 20:44
All Logins come from the IP 127.0.0.1, so if a user locks the IP out, all users get locked out, as they all have the same IP address.Add this to wp-config.php file, just ABOVE the line:/* That’s all, stop editing! Happy blogging. */
/** Required Code for showing correct IP address */
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$xffaddrs = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $xffaddrs[0];
}
@bluedognz
bluedognz / style.css
Created December 20, 2017 02:11
H1,2,3 responsive CSS snippet
/** GLOBAL SMALL DEVICE H1,2,3 FONT SIZES **/
@media (max-width: 768px) {
h1 {
font-size: 32px;
}}
@media (max-width: 768px) {
h2 {
font-size: 28px;
}}
@media (max-width: 768px) {
@bluedognz
bluedognz / simple-user-listing.php
Created December 22, 2017 05:01
Simple User Listing (with search)
<?php
/*
Plugin Name: Simple User Listing
Plugin URI: http://cozmoslabs.com
description: >-
Create a simple shortcode to list our WordPress users.
Author: Cristian Antohe
Version: 0.1
Author URI: http://cozmoslabs.com
*/
@bluedognz
bluedognz / breadcrumbs.php
Created February 14, 2018 02:00
This works with Beaver Themer and Astra Theme using [my_breadcrumb] (ie: Insert the shortcode into a Themer Part to display breadcrumbs)
function my_breadcrumb() {
if ( function_exists('yoast_breadcrumb') ) {
return yoast_breadcrumb( '<p id="breadcrumbs">', '</p>', false);
}
}
add_shortcode( 'my_breadcrumb', 'my_breadcrumb' );
@bluedognz
bluedognz / imageseo
Last active July 17, 2018 13:10
Automatically set the image Title, Alt-Text, Caption & Description upon upload
/* AUTOMATICALLY SET THE IMAGE TITLE, ALT-TEXT, CAPTION AND DESCRIPTION UPON UPLOAD */
add_action( 'add_attachment', 'my_set_image_meta_upon_image_upload' );
function my_set_image_meta_upon_image_upload( $post_ID ) {
// Check if uploaded file is an image, else do nothing
if ( wp_attachment_is_image( $post_ID ) ) {
$my_image_title = get_post( $post_ID )->post_title;
@bluedognz
bluedognz / aiowps
Created June 27, 2018 12:32
Paste these settings into the import data field /wp-admin/admin.php?page=aiowpsec_settings&tab=tab5
{"aiowps_enable_debug":"","aiowps_remove_wp_generator_meta_info":"","aiowps_prevent_hotlinking":"","aiowps_enable_login_lockdown":"1","aiowps_allow_unlock_requests":"","aiowps_max_login_attempts":3,"aiowps_retry_time_period":5,"aiowps_lockout_time_length":60,"aiowps_set_generic_login_msg":"","aiowps_enable_email_notify":"","aiowps_email_address":"director@bluedogwebdesign.com","aiowps_enable_forced_logout":"","aiowps_logout_time_period":"60","aiowps_enable_invalid_username_lockdown":"","aiowps_instantly_lockout_specific_usernames":[],"aiowps_unlock_request_secret_key":"c31usuoi4463n8m6h7aa","aiowps_lockdown_enable_whitelisting":"","aiowps_lockdown_allowed_ip_addresses":"","aiowps_enable_whitelisting":"","aiowps_allowed_ip_addresses":"","aiowps_enable_login_captcha":"","aiowps_enable_custom_login_captcha":"","aiowps_captcha_secret_key":"7wwzyyjsleq6sspggiw4","aiowps_enable_manual_registration_approval":"","aiowps_enable_registration_page_captcha":"","aiowps_enable_registration_honeypot":"","aiowps_enable_rando