Skip to content

Instantly share code, notes, and snippets.

View socialspark's full-sized avatar

SocialSpark socialspark

View GitHub Profile
<?php
/**
*-----------------------------------------------------------
* Add publisher logo/image schema for Beaver Builder plugin
*-----------------------------------------------------------
*
* Filter: 'fl_schema_meta_publisher_image_url'
* Defined in: bb-plugin/modules/post-grid/post-grid.php
*
@fastlinemedia
fastlinemedia / custom-hooks.php
Created May 16, 2017 04:16
Adding custom hooks for parts to Beaver Themer.
function my_theme_register_part_hooks( $parts ) {
$parts[] = array(
'label' => 'Custom Hooks',
'hooks' => array(
'genesis_after_before-footer_widget_area' => 'Before Footer Widgets',
)
);
return $parts;
}
add_filter( 'fl_theme_builder_part_hooks', 'my_theme_register_part_hooks', 11 );
genesis_register_sidebar( array(
'id' => 'home-featured-left',
'name' => 'Home Featured Left',
'description' => 'This is the Home Featured Left section'
) );
genesis_register_sidebar( array(
'id' => 'home-featured-right',
'name' => 'Home Featured Right',
'description' => 'This is the Home Featured Right section'
) );
@robincornett
robincornett / functions.php
Last active August 29, 2015 14:05
add featured image to feed (for feeds using excerpts instead of full content). Uses the thumbnail sized image, aligned left, with a margin for the email.
<?php
// you can add this to your theme's functions.php file. do not include the opening tag.
add_filter( 'the_excerpt_rss', 'rgc_add_featured_image_to_feed_excerpt', 1000, 1 );
function rgc_add_featured_image_to_feed_excerpt( $content ) {
if ( has_post_thumbnail( get_the_ID() ) ) {
$content = get_the_post_thumbnail( get_the_ID(), 'thumbnail', array( 'align' => 'left', 'style' => 'margin-right:20px;' ) ) . $content;
}
<?php
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
remove_action( 'genesis_loop', 'genesis_do_loop' );
genesis();
?>
.label-fluid-page .site-inner,
.label-fluid-page .content-sidebar-wrap,
.label-fluid-page .content {
width: 100%;
max-width: 100%;
padding: 0;
}
.top-row-wrap {
background: #eee;
}
<div class="top-row-wrap">
<div class="top-row-wrap-inner">
<?php echo do_shortcode( '[top_left]' ); ?><?php echo do_shortcode( '[top_right]' ); ?>
</div>
</div>
<div class="bottom-row-wrap">
<div class="bottom-row-wrap-inner">
<?php echo do_shortcode( '[bottom_left]' ); ?><?php echo do_shortcode( '[bottom_right]' ); ?>
</div>
@wpsmith
wpsmith / column-classes.css
Last active October 11, 2017 19:02
CSS: Genesis Column Classes including fifths
/* Column Classes
Link: Link: http://wpsmith.net/2013/wp/genesis-2-0-drops-fifths-from-column-classes/
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.four-fifths,
.one-fifth,
.one-fourth,
@studiopress
studiopress / columns.css
Last active August 10, 2023 13:50
Genesis column classes.
/* Column Classes
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.one-fourth,
.one-half,
.one-sixth,
.one-third,