Skip to content

Instantly share code, notes, and snippets.

Sallie Goetsch wpfangirl

Block or report user

Report or block wpfangirl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wpfangirl
wpfangirl / create-image.php
Created Oct 25, 2018
Set Gravity Forms upload as post thumbnail (featured image)
View create-image.php
<?php
/**
* Create the image attachment and return the new media upload id.
*
* @author Joshua David Nelson, josh@joshuadnelson.com
*
* @since 03.29.2017 updated to a class, utilizing code from Takuro Hishikawa's gist linked below.
*
* @see https://gist.github.com/hissy/7352933
*
@wpfangirl
wpfangirl / portfolio-block-template.php
Last active Mar 16, 2019
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
<?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
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
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
wpfangirl / event-functions-1.php
Last active May 23, 2017
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') ) {
return;
}
if( ! has_post_thumbnail() ) {
return;
}
@wpfangirl
wpfangirl / 01-flex-defaults.html
Last active Oct 22, 2016
WCSAC 2016 Flexbox Files
View 01-flex-defaults.html
<html>
<head>
<style>
body {
font-family: sans-serif;
font-size: 20px;
}
.flex-container {
border: 4px solid #09f;
height: 50vh;
You can’t perform that action at this time.