Skip to content

Instantly share code, notes, and snippets.

View psahalot's full-sized avatar

Puneet Sahalot psahalot

View GitHub Profile
@psahalot
psahalot / modalbox-function.php
Created September 13, 2019 07:30
Display Modal Box on all Pages except one.
function beaveraddons_popup_box() {
if (!is_page('your-page-slug')) {
echo do_shortcode('[fl_builder_insert_layout slug="site-wide-popup"]');
}
}
add_action('fl_after_content', 'beaveraddons_popup_box');
@psahalot
psahalot / .htaccess
Created March 27, 2019 16:32
Adjust Apache service limits for Elementor
<IfModule mod_substitute.c>
SubstituteMaxLineLength 30m
</IfModule>
LimitRequestBody 9999999
@psahalot
psahalot / layout-style.css
Created June 7, 2018 06:42
Content Grid Custom Layout CSS
.pp-content-grid-post {
font-size: 14px;
}
.pp-content-grid-post-image {
padding: 0;
position: relative;
}
.pp-content-grid-post-image a img {
filter: saturate(1.6) contrast(1.1);
opacity: 1;
@psahalot
psahalot / menu-logo.php
Created September 22, 2017 08:51
Logo in Advanced Menu module
function pp_add_logo_before_menu() {
echo '<a href="your-website-url"><img src="logo-url" /></a>';
}
add_action('pp_advanced_menu_before', 'pp_add_logo_before_menu');
@psahalot
psahalot / off-canvas-search.php
Last active November 18, 2018 22:27
add search box to off-canvas menu
// Advanced Menu - off-canvas before menu items
function wpba_demo_offcanvas_menu_before( $type, $settings, $id ) { ?>
<style>
.wpba-menu-content { margin-top: 50px; padding: 40px; padding-bottom: 10px; }
</style>
<div class="wpba-menu-content">
<div class="wpba-menu-search">
<?php echo get_search_form(); ?>
</div>
<h3>About us</h3>
@psahalot
psahalot / layout-html.html
Last active October 16, 2018 18:21
Custom Grid Demo 2 HTML
[wpbb-if post:featured_image]
<div class="pp-content-grid-post-image">
[wpbb post:featured_image size="large" display="tag" linked="yes"]
<div class="pp-content-grid-post-text">
<h3 class="pp-content-grid-post-title">[wpbb post:link text="title"]</h3>
<div class="pp-content-grid-post-meta">
[wpbb post:date format="F j, Y"]
</div>
</div>
@psahalot
psahalot / layout-css.css
Last active October 16, 2018 18:21
Custom Grid Demo 2 CSS
.pp-content-grid-post {
font-size: 14px;
border: 1px solid #fff !important;
background: #F44336 !important;
}
.pp-content-grid-post-image {
padding: 0;
position: relative;
}
.pp-content-grid-post-image a img {
@psahalot
psahalot / layout-html.html
Last active October 16, 2018 18:20
Custom Layout 3 Demo HTML
[wpbb-if post:featured_image]
<div class="pp-content-grid-post-image">
[wpbb post:featured_image size="large" display="tag" linked="yes"]
<div class="pp-content-grid-post-text">
<h3 class="pp-content-grid-post-title">[wpbb post:link text="title"]</h3>
<div class="pp-content-grid-post-meta">
[wpbb post:date format="F j, Y"]
</div>
</div>
@psahalot
psahalot / layout-css.css
Created October 16, 2018 18:19
Custom Layout 3 Demo CSS
.pp-content-grid-post {
font-size: 14px;
background: #3F51B5 !important;
height: 500px !important;
}
.pp-content-grid-post-image {
padding: 0;
position: relative;
}
.pp-content-grid-post-image a img {
@psahalot
psahalot / layout-html.html
Created June 7, 2018 06:42
Content Grid Custom Layout
[wpbb-if post:featured_image]
<div class="pp-content-grid-post-image">
[wpbb post:featured_image size="large" display="tag" linked="yes"]
<div class="pp-content-grid-post-text">
<h3 class="pp-content-grid-post-title">[wpbb post:link text="title"]</h3>
<div class="pp-content-grid-post-meta">
[wpbb post:date format="F j, Y"]
</div>
</div>