Skip to content

Instantly share code, notes, and snippets.

View nirbhay18's full-sized avatar
🏠
Working from home

Nirbhay Singh Rao nirbhay18

🏠
Working from home
View GitHub Profile
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,700;1,800;1,900&display=swap');
@nirbhay18
nirbhay18 / logo-in-lightbox.css
Created May 21, 2021 04:26
Add Logo to Elementor's Lightbox
img.elementor-lightbox-image {
display: block;
height: 65vh; /* Adjust the height of the image displayed in the lightbox. */
}
.swiper-container.swiper-container-initialized::before {
/* Replace the link with custom logo link uploaded on the site */
content: url(https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png);
@nirbhay18
nirbhay18 / 17138.css
Created September 23, 2020 12:04
Animate PowerPack for Elementor Advanced Accordions toggle icons.
/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v7.0.29,
* Autoprefixer: v9.7.6
* Browsers: last 2 version
*/
@-webkit-keyframes ClockwiseSpin {
0% {-webkit-transform: rotate(0deg);transform: rotate(0deg);}
100% {-webkit-transform: rotate(45deg);transform: rotate(45deg);}
@nirbhay18
nirbhay18 / 14828.php
Created June 10, 2020 10:55
Stop Scrolling in the Content Grid when Filters are Clicked
<?php
// PowerPack Content Grid prevent scroll animation on filtering
add_filter( 'pp_cg_scroll_to_grid_on_filter', '__return_false' );
@nirbhay18
nirbhay18 / 13400.php
Last active May 19, 2020 10:42
Customize date format for Post Timeline
function pp_timeline_custom_date_format() {
$date = get_post_meta( get_the_ID(), 'mec_start_date', true );
$timestamp = strtotime( $date );
$new_date = date( 'F j', $timestamp );
return $new_date;
}
add_filter( 'pp_timeline_date_format','pp_timeline_custom_date_format' );
function add_social_share() {
if (is_single() && !is_archive()){
echo do_shortcode("[fl_builder_insert_layout slug='social_buttons']");
}
}
add_action('generate_after_content','add_social_share',10,3);