This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: My Pattern Library | |
* Description: A simple library of block patterns. | |
* Version: 0.1.0 | |
* Requires at least: 5.8 | |
* Requires PHP: 7.0 | |
* Author: Your Name | |
* License: GPL v2 or later | |
* Text Domain: my-pattern-library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Column Classes | |
* | |
* Width: 100% | |
* Gutter: 2.5641025641% | |
* Link: http://www.nickdiego.com/plugins/column-class-builder/ | |
----------------------------------------------------------------------------- */ | |
.five-sixths, | |
.four-fifths, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 | |
*/ |