Skip to content

Instantly share code, notes, and snippets.

View fahimxyz's full-sized avatar
🌼
I may be slow to respond.

Fahim fahimxyz

🌼
I may be slow to respond.
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fahimxyz
fahimxyz / MobileFirstMethod.css
Created February 6, 2019 05:41
Responsive Breakpoint ( CSS Media Queries for Desktop, Tablet, Mobile )
## Mobile First Method
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
@fahimxyz
fahimxyz / Divi Border Radius
Last active March 19, 2019 21:36
Divi Border Radius Field Value Render View and Front End View
const overlay_radii = props.overlay_radii ? props.overlay_radii.split("|") : [];
additionalCss.push([{
selector: "%%order_class%% .qv-overlay",
declaration: `border-radius: ${overlay_radii[1] || 0} ${overlay_radii[2] || 0} ${overlay_radii[3] || 0} ${overlay_radii[4] || 0} `
}]);
@fahimxyz
fahimxyz / functions.php
Created March 21, 2019 16:20
How to Remove the Projects Post Type in Divi by Elegant Themes
<?php
add_filter( 'et_project_posttype_args', 'dvppl_remove_project_posttype', 10, 1 );
function dvppl_remove_project_posttype( $args ) {
return array_merge( $args, array(
'public' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'show_in_nav_menus' => false,
@fahimxyz
fahimxyz / google-reviews.php
Created April 10, 2019 02:14 — forked from iambrianreich/google-reviews.php
Use the Google Places API to render a Google My Business reviews badge on a WordPress site using shortcodes.
<?php /** @noinspection SpellCheckingInspection */
/**
* This file contains the WordPress code for rendering a Google Reviews badge.
*
* Usage:
*
* 1. Create a Google API Console account if you have not already done so.
* 2. Register for the Google Places API.
* 3. Create an API key.
* 4. Ensure that the API key can be used from wherever this script will execute
@fahimxyz
fahimxyz / index.php
Created April 23, 2019 12:58 — forked from ciorici/index.php
Featured Products Loop in WooCommerce 3.0
<ul class="products">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 12,
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
@fahimxyz
fahimxyz / gist:e0ff35609236fd0eb1ac6444241b898a
Created April 23, 2019 13:00 — forked from kloon/gist:4604038
WooCommerce Sale Products shortcode
<?php
add_shortcode( 'sale_products', 'sale_products' );
function sale_products( $atts ){
global $woocommerce_loop, $woocommerce;
extract( shortcode_atts( array(
'per_page' => '12',
'columns' => '4',
'orderby' => 'title',
'order' => 'asc'
@fahimxyz
fahimxyz / Settings_Fields.php
Last active December 11, 2019 11:13
Divi Settings Fields and Advanced Fields
<?php
/**
* All Fields List
* @author Mohammad Fahim
* @link https://fahim.xyz
*/
function get_fields() {
<?php
/*
* WordPress Breadcrumbs
* author: Dimox
* version: 2019.03.03
* license: MIT
*/
function dimox_breadcrumbs() {
/* === OPTIONS === */
@fahimxyz
fahimxyz / DiviModuleName.php
Created November 6, 2019 09:31
Divi Module Class
<?php
class Prefix_Module_Name extends ET_Builder_Module {
public $slug = 'module_slug_name';
public $vb_support = 'on';
protected $module_credits = array(
'module_uri' => 'module_url',
'author' => 'Author Name',