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_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 / 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 / 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 / register-block-patterns
Created February 21, 2022 11:55
Register Block Patterns
/**
* Register custom patterns.
*/
function example_register_block_patterns() {
register_block_pattern(
'example/feature-grid-light',
array(
'title' => __( 'Feature Grid - Light', 'my-pattern-library' ),
'description' => __( 'Showcase six featured items in a grid on a light background.', 'textdomain' ),
@ndiego
ndiego / builder-basics-code-examples.txt
Last active December 14, 2022 13:51
Columns, Groups, Rows, and Stacks: Code Examples
Add the following to the style.css file of the theme.
-------------------------------------------------------------------------------------
// Make the block sticky.
.sticky-column-content {
position: sticky;
top: 60px;
}
// Justify the space between all internal blocks. Add to Stack blocks.