Skip to content

Instantly share code, notes, and snippets.

View norewp's full-sized avatar

Zulfikar Nore norewp

View GitHub Profile
@norewp
norewp / single-elementor_library.php
Created February 21, 2018 11:05 — forked from pingram3541/single-elementor_library.php
Used in theme functions.php - set Elementor Library post type to use built-in Canvas template by default
/* ---------------------------------------------------------------------------
* Force Elementor Library to use Canvas Template
* - this gist file name can also be used in your theme to override the template instead of this
* --------------------------------------------------------------------------- */
function get_elementor_library_post_type_template( $single_template ) {
global $post;
if ($post->post_type == 'elementor_library') {
$single_template = dirname( __FILE__ ) . '/../../plugins/elementor/includes/page-templates/canvas.php';
}
<?php
return [
'&#xE84D;' => '3d_rotation',
'&#xE190;' => 'access_alarm',
'&#xE191;' => 'access_alarms',
'&#xE192;' => 'access_time',
'&#xE84E;' => 'accessibility',
'&#xE84F;' => 'account_balance',
'&#xE850;' => 'account_balance_wallet',
<?php
return [
'&#xf26e;' => 'fa-500px',
'&#xf2b9;' => 'fa-address-book',
'&#xf2ba;' => 'fa-address-book-o',
'&#xf2bb;' => 'fa-address-card',
'&#xf2bc;' => 'fa-address-card-o',
'&#xf042;' => 'fa-adjust',
'&#xf170;' => 'fa-adn',
@norewp
norewp / functions.php
Created January 10, 2018 23:45 — forked from lukecav/functions.php
Disable Elementor overview dashboard widget in WordPress
function disable_elementor_dashboard_overview_widget() {
remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'disable_elementor_dashboard_overview_widget', 40);
@norewp
norewp / elementorcssinhead.php
Created October 16, 2017 19:47 — forked from nicomollet/elementorcssinhead.php
Load Elementor styles on all pages in the head to avoid CSS files being loaded in the footer
<?php
/**
* Load Elementor styles on all pages in the head to avoid CSS files being loaded in the footer
*/
function elementor_css_in_head(){
if(class_exists('\Elementor\Plugin')){
$elementor = \Elementor\Plugin::instance();
$elementor->frontend->enqueue_styles();
}
if(class_exists('\ElementorPro\Plugin')){
@norewp
norewp / Contract Killer 3.md
Created August 30, 2017 01:01 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post