Skip to content

Instantly share code, notes, and snippets.

View norewp's full-sized avatar

Zulfikar Nore norewp

View GitHub Profile
@pingram3541
pingram3541 / single-elementor_library.php
Last active February 21, 2018 18:24
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 = WP_PLUGIN_DIR . '/elementor/includes/page-templates/canvas.php';
}
@lukecav
lukecav / functions.php
Created January 10, 2018 03:22
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);
@carasmo
carasmo / gravatar-avatar-outside-loop.php
Last active September 29, 2018 06:03
Get Gravatar / Avatar Outside of loop WordPress.
<?php
//* Do not copy above. Add the hook where it's going. Change the function name to reflect your situation.
add_action( 'your_hook', 'themeprefix_author_gravatar_outside_loop_single_post' );
//* Author Gravatar/Avatar outside of Loop on Single posts
function themeprefix_author_gravatar_outside_loop_single_post() {
@nicomollet
nicomollet / elementorcssinhead.php
Last active December 6, 2022 09:21
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')){