Skip to content

Instantly share code, notes, and snippets.

View ndiego's full-sized avatar

Nick Diego ndiego

View GitHub Profile
@ndiego
ndiego / blox_markup_image.html
Last active November 5, 2015 02:14
Blox Frontend Markup
/**
* Example frontend markup for a Local static image block
*/
<div id="blox_1572" class="blox-container blox-content-image blox-theme-default blox-scope-local">
<div class="blox-wrap">
<div class="blox-image-container custom">
<div class="blox-image-wrap">
<a href="http://www.example.com" target="_blank" title="The Link Title">
<img src="https://www.bloxwp.com/wp-content/uploads/2015/10/sample_image.jpg" >
</a>
@ndiego
ndiego / blox_markup.html
Last active December 1, 2016 11:58
Blox Frontend Markup Examples
<!-- Example frontend markup for Blox -->
<div id="blox_global_1234" class="blox-container blox-content-[content_type] blox-theme-[set_theme] blox-scope-[global_local] [custom_classes]">
<div class="blox-wrap [wrap]">
<!-- Additional markup is added here depending on the content_type that is selected -->
</div>
</div>
@ndiego
ndiego / blox_default_styles.css
Last active August 8, 2019 12:24
Blox Default Styles
/**
* Blox Frontend Default Styles
*
* This stylesheet supplies default styling for Blox. It can be disabled in the Blox settings.
*
* @package Blox
* @copyright Copyright (c) 2015, Nick Diego
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
@ndiego
ndiego / blox_tutorial_banner_image_all_posts_page_title.css
Last active April 17, 2016 16:28
Blox Tutorial: Adding a banner image to all posts with a page title overlay
/* Edit the block id to match the block you are working on */
#blox_global_95 .blox-caption-container {
display: table; /* Required to vertically center text */
height: 100%; /* Make container cover whole image */
text-align: center; /* Center align the page title */
top: 0; /* Make container cover whole image */
}
#blox_global_95 .blox-caption-wrap {
background: none; /* Remove overlay */
/* Edit the block id to match the block you are working on */
#blox_global_110 .blox-caption-container {
display: table; /* Required to vertically center text */
height: 100%; /* Make container cover whole image */
text-align: center; /* Center align the page title */
top: 0; /* Make container cover whole image */
}
#blox_global_110 .blox-caption-wrap {
background: none; /* Remove overlay */
<?php
// Do NOT include the opening php tag shown above. Copy the code shown below.
// To use this filter, it needs to be added to your functions.php file
add_filter( 'blox_disable_content_blocks', 'disable_landingpage_blocks', 10, 5 );
/**
*
* @param bol $disable The disable test, defaults to false
* @param string $postition The position hook of the block
* @param string $id The id of the block
@ndiego
ndiego / eps-aggregate-demo.html
Last active July 4, 2016 15:49
Easy Plugin Stats - Demos
<!-- Aggregate stats demo for Easy Plugin Stats -->
...WordPress community. My code is currently running on <strong>[eps type="aggregate" slug="blox-lite genesis-columns-advanced genesis-featured-page-advanced genesis-custom-headers" field="active_installs"]+</strong> websites and has been downloaded <strong>[eps type="aggregate" slug="blox-lite genesis-columns-advanced genesis-featured-page-advanced genesis-custom-headers" field="downloaded"]</strong> times...
@ndiego
ndiego / column-classes-default.css
Last active November 30, 2023 17:35
Column Classes - Built off the base column classes originally supplied in the Genesis Framework with fifths added.
/**
* Column Classes
*
* Width: 100%
* Gutter: 2.5641025641%
* Link: http://www.nickdiego.com/plugins/column-class-builder/
----------------------------------------------------------------------------- */
.five-sixths,
.four-fifths,
@ndiego
ndiego / page-title-with-subtitle.php
Created October 17, 2016 19:05
Custom Page Title with Sub-Titles
<?php
// Add our custom page title to singular pages, but not the homepage or blog page
if ( is_page() && ! is_home() && ! is_front_page() ) {
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_after_header', 'blox_open_post_title', 1 );
add_action( 'genesis_after_header', 'blox_do_page_title', 2 );
add_action( 'genesis_after_header', 'blox_close_post_title', 3 );
}
// Custom title opener
@ndiego
ndiego / sticky-block.html
Created October 25, 2016 23:38
Sticky Block - js + CSS
<script type="text/javascript">
jQuery(document).ready(function($) {
// Only enable when the screen size is large enough for a sidebar
if ( $(window).width() > '1024' ) {
// Fix the block if our scroll position is below the top of the page - 1px to make transition more fluid.
var top = $('.sticky').offset().top - 1;
$(window).scroll(function(e) {