Skip to content

Instantly share code, notes, and snippets.


Sallie Goetsch wpfangirl

View GitHub Profile
wpfangirl / template.html
Created Jan 15, 2022
Add a row to your block template
View template.html
/* Adds the row block in an HTML template */
<!-- wp:group {"layout":{"type":"flex","allowOrientation":false}} -->
<div class="wp-block-group"></div>
<!-- /wp:group -->
wpfangirl / acf-blocks.css
Last active Jan 24, 2022
Code Examples for ACF Blocks
View acf-blocks.css
/* PDF Thumbnail Block */
.pdf-thumbnail {
margin-top: 1rem;
margin-bottom: 1.75rem;
.link-to-pdf img {
box-shadow: 2px 2px 5px rgba(53, 53, 47, 0.2);
wpfangirl / create-image.php
Created Oct 25, 2018
Set Gravity Forms upload as post thumbnail (featured image)
View create-image.php
* Create the image attachment and return the new media upload id.
* @author Joshua David Nelson,
* @since 03.29.2017 updated to a class, utilizing code from Takuro Hishikawa's gist linked below.
* @see
wpfangirl / portfolio-block-template.php
Last active Mar 28, 2020
Add Gutenberg suport and a block template to an existing portfolio post type (e.g. from the Portfolio Post Type or Genesis Portfolio Pro plugin)
View portfolio-block-template.php
* Adds block template to existing post type 'portfolio' with taxonomies 'portfolio_category' and 'portfolio_tag'.
// Add Block Template to existing portfolio post type
function bbp_add_portfolio_template() {
$post_type_object = get_post_type_object( 'portfolio' );
$post_type_object->show_in_rest = true;
$post_type_object->rest_base = 'portfolio';
wpfangirl / functions.php
Created May 11, 2018
Show Custom Post Types in WordPress Dashboard "Recent Activity" Widget
View functions.php
<?php // Don't add the opening PHP tag. Instead, add this to your functionality plugin or at the end of functions.php.
//* Add All CPTs to "Recent Activity"
add_filter( 'dashboard_recent_posts_query_args', 'sinickas_dashboard_activity', 10, 1 );
function sinickas_dashboard_activity($query_args) {
$args = array(
// Excludes post types that don't show on the front end
'publicly_queryable' => true
$post_types = get_post_types($args);
wpfangirl / reposition-single-calendar-links.php
Created Apr 18, 2018
Relocate Modern Tribe Calendar Export Links Below Event Meta on Single Events
View reposition-single-calendar-links.php
wpfangirl / event-functions-1.php
Last active Mar 16, 2022
Modify the Event Image Size with Filters (The Events Calendar)
View event-functions-1.php
// Change size of featured image on single events using post_thumbnail_size
add_filter( 'post_thumbnail_size', 'ebwp_single_event_post_thumbnail_size');
function ebwp_single_event_post_thumbnail_size($size) {
if( !is_singular('tribe_events') ) {
if( ! has_post_thumbnail() ) {
wpfangirl / 01-flex-defaults.html
Last active Oct 22, 2016
WCSAC 2016 Flexbox Files
View 01-flex-defaults.html
body {
font-family: sans-serif;
font-size: 20px;
.flex-container {
border: 4px solid #09f;
height: 50vh;