Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Galofre gdnwebmedia

View GitHub Profile
@gdnwebmedia
gdnwebmedia / general-animations.css
Last active March 10, 2023 14:32
General CSS snippets for Bricks Builder
View general-animations.css
/*
Set the CSS transition to 0.4s right above the custom CSS block
*/
root:hover { transform: scale(1.03); }
/* subtle shadow */
root {
box-shadow:
0px 0.1px 0.9px rgba(0, 0, 0, 0.014),
0px 0.3px 2.1px rgba(0, 0, 0, 0.02),
View css animations - gdn websites.css
:root {
--transition-n: 0.4s;
}
.an-hover-scale {
transition-duration: var(--transition-n);
}
.an-hover-scale:hover {
transform: scale(1.05,1.05);
transition-duration: var(--transition-n);
@gdnwebmedia
gdnwebmedia / branda-custom-login-AbstractTag-customizations.css
Created May 27, 2021 13:36
Custom modifications to enhance Branda's AbstractTag Custom Login Template
View branda-custom-login-AbstractTag-customizations.css
html body {
display: flex;
align-items: stretch;
align-content: flex-start;
background-position: 200px 50%;
background-color: #ffffff;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
@gdnwebmedia
gdnwebmedia / wpmudev_hustle_media_library_fix.php
Last active June 7, 2021 21:30
When active, WPMUDEV hustle breaks the media library (v 4.4.4 or older) This is a temp fix.
View wpmudev_hustle_media_library_fix.php
<?php
// wpmudev_hustle_media_library_fix
// Add this to the functions.php file or use Advanced Scripts to add it when plugins are loaded
function wpmudev_hustle_dequeue_script() {
if( isset( $_GET['ct_builder'] ) ){
wp_dequeue_script( 'hui_scripts' );
wp_dequeue_script( 'hustle_front' );
}
}
add_action( 'wp_print_scripts', 'wpmudev_hustle_dequeue_script', 100 );
@gdnwebmedia
gdnwebmedia / php-clean-wp_query-output.php
Created May 16, 2021 18:14
Readable version of wp_query output
View php-clean-wp_query-output.php
printf( '<pre>%s</pre>', print_r( $wp_query, 1 ) );
@gdnwebmedia
gdnwebmedia / wp-hide-related-videos-sitewide.php
Created March 4, 2021 14:57
Add modestbranding to WP Gutenberg Video Blocks
View wp-hide-related-videos-sitewide.php
@gdnwebmedia
gdnwebmedia / wp-search-post-and-pages-only.php
Last active March 20, 2021 15:26
Search only WordPress Posts & pages
View wp-search-post-and-pages-only.php
<?php
// Search only Posts or Pages
//Exclude pages from WordPress Search
function wpb_search_filter( $query ) {
if ( ! is_admin() && $query->is_main_query() && $query->is_search() ) {
$query->set( 'post_type', [ 'post', 'page' ] );
}
}
@gdnwebmedia
gdnwebmedia / retrieves-thumbnail-youtube.php
Last active February 26, 2021 04:30
Retrieves the thumbnail from a youtube or vimeo video
View retrieves-thumbnail-youtube.php
<?php
/**
* Retrieves the thumbnail from a youtube or vimeo video
* @param - $src: the url of the "player"
* @return - string
*
**/
function get_video_thumbnail( $src ) {
$url_pieces = explode('/', $src);
@gdnwebmedia
gdnwebmedia / forminator-send-tags-via-form.php
Last active February 18, 2021 22:49
Using the Mailchimp Integration already included in Forminator Pro. This scripts allows us to add one or multiple tags to a Forminator Pro form.
View forminator-send-tags-via-form.php
<?php
/*
Name: forminator-send-tags-via-form.php
Description: Sends Mailchimp Tags via Forminator Pro
Source: Konstantinos @
URL: https://premium.wpmudev.org/forums/topic/can-i-send-mailchimp-tags-via-form/#post-3624257
Using the Mailchimp Integration already included in Forminator Pro. This scripts allows us to add one or multiple tags to a Forminator Pro form.
install this code in the /mu-plugins folder
@gdnwebmedia
gdnwebmedia / oxygen-pods-gallery-loop.php
Last active February 17, 2021 15:38
Add Pods Admin based images in your template file
View oxygen-pods-gallery-loop.php