This file contains 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
/** | |
* Add to your stylesheet if it isn't there | |
*/ | |
.wp-embed-responsive { | |
position:relative; | |
margin-bottom: 20px; | |
} | |
.wp-embed-responsive > iframe{ |
This file contains 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
/* Adds the row block in an HTML template */ | |
<!-- wp:group {"layout":{"type":"flex","allowOrientation":false}} --> | |
<div class="wp-block-group"></div> | |
<!-- /wp:group --> |
This file contains 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
/* 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); | |
} |
This file contains 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 | |
/** | |
* Create the image attachment and return the new media upload id. | |
* | |
* @author Joshua David Nelson, [email protected] | |
* | |
* @since 03.29.2017 updated to a class, utilizing code from Takuro Hishikawa's gist linked below. | |
* | |
* @see https://gist.github.com/hissy/7352933 | |
* |
This file contains 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 | |
/** | |
* 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'; |
This file contains 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 // 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); |
This file contains 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
/** | |
* Relocate calendar export links below event meta on single events | |
* H/T GeoffEW: https://gist.github.com/GeoffEW/b8f0bb5fc2b8510c6ad4f0b60fcf3fb9 | |
* | |
*/ | |
class Tribe__Events__Remove__Export__Links { | |
public function __construct() { | |
add_action( 'init', array( $this, 'single_event_links' ) ); | |
} |
This file contains 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
// 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; | |
} |
This file contains 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
<html> | |
<head> | |
<style> | |
body { | |
font-family: sans-serif; | |
font-size: 20px; | |
} | |
.flex-container { | |
border: 4px solid #09f; | |
height: 50vh; |