Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Galofre gdnwebmedia

View GitHub Profile
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 / wpmudev_hustle_media_library_fix.php
Last active Jun 7, 2021
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 / branda-custom-login-AbstractTag-customizations.css
Created May 27, 2021
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 / php-clean-wp_query-output.php
Created May 16, 2021
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-search-post-and-pages-only.php
Last active Mar 20, 2021
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 / wp-hide-related-videos-sitewide.php
Created Mar 4, 2021
Add modestbranding to WP Gutenberg Video Blocks
View wp-hide-related-videos-sitewide.php
@gdnwebmedia
gdnwebmedia / retrieves-thumbnail-youtube.php
Last active Feb 26, 2021
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 Feb 18, 2021
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 Feb 17, 2021
Add Pods Admin based images in your template file
View oxygen-pods-gallery-loop.php
View oxygen-custom-taxonomies-without-links.php