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
/// Links | |
/* | |
All elements with the .brxe-post-sharing and .no-target-icon will not show the icon | |
*/ | |
body a[target="_blank"]:not(.brxe-post-sharing):not(.no-target-icon):not(figure.no-target-icon a)::after { | |
content: '\2197'; /* Unicode for ↗ */ | |
font-size: .65em; | |
vertical-align: middle; |
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
/* | |
Please note: | |
The code uses __replace_with_post_type_slug__ which needs to be replaced with the actual post type slug where this functionality is desired. | |
Also replace ___replace_with_new_name___ with the new name you wish to use. | |
*/ | |
add_action( 'admin_head', 'replace_default_featured_image_meta_box', 100 ); | |
function replace_default_featured_image_meta_box() { | |
remove_meta_box( 'postimagediv', '__replace_with_post_type_slug__', 'side' ); |
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
/* | |
This is to be used using Bricks & Automatic CSS already installed. Otherwise, replace %root% with the element/class/ID and add values to existing root variables like var(--radius-m). | |
*/ | |
%root% { | |
width: 100%; | |
max-width: 90em; | |
} | |
@media screen and (min-width: 1600px) { |
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
/* | |
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), |
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 | |
add_filter( 'body_class', 'add_role_to_body_class' ); | |
function add_role_to_body_class( $classes ) { | |
// Get the current user's roles | |
$user_roles = wp_get_current_user()->roles; | |
// Loop through the roles and add them to the body class | |
foreach ($user_roles as $role) { |
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
: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); |
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 | |
// 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 ); |
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 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; |
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
printf( '<pre>%s</pre>', print_r( $wp_query, 1 ) ); |
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 | |
// 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' ] ); | |
} | |
} |
NewerOlder