This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Create a page called "Coming Soon" | |
// Make sure that the permalink looks like this: my-domain.com/coming-soon/ | |
// Then paste the snippet below into your themes (child-themes) functions.php. | |
// After inserting, any user who is not logged-in will be redirected to your coming-soon page. | |
add_action( 'init', function() | |
{ | |
if( ! is_user_logged_in() ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the snippet below in the file wp-config.php right above: /* That's all, stop editing! Happy blogging. */ | |
define('WP_DEBUG', true ); | |
if ( WP_DEBUG ) | |
{ | |
define('SAVEQUERIES', true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is a fork of the shortcode-finder described in this useful post: http://www.wpbeginner.com/wp-tutorials/how-to-find-and-remove-unused-shortcodes-from-wordpress-posts/ | |
// Just add the snippet in your themes functions.php. You can use this shortcode in a post or page, as shown in the following example: | |
// [find_shortcode name='et_pb_dfbm_blog'] | |
add_shortcode( 'find_shortcode', function( $atts, $content = false ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent Downgrading | |
add_filter( 'woocommerce_subscriptions_switch_is_identical_product', function( $is_identical_product, $product_id, $quantity, $variation_id, $subscription, $item ) | |
{ | |
if ( wc_get_product( (int) $product_id )->get_price() < $item->get_product()->get_price() ) | |
{ | |
$is_identical_product = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$(function(){ | |
"use strict"; | |
$( '#e-placeholder' ).find( 'img' ).on( 'click', function() | |
{ | |
var link = $( '<a />', | |
{ | |
id : 'e-remove', | |
href : 'mailto:[email protected]?Subject=I want to get in touch with you!&body=My message to you.', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Do not allow direct access | |
* | |
* @since 1.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) die( 'Don\'t try to load this file directly!' ); | |
/** | |
* Indikator Design - EMP License Key Registration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Here you can see how to combine "Divi - Filterable Blog Module" with the free plugin "Events Manager": https://wordpress.org/plugins/events-manager/ | |
// Just add these snippets to your themes functions.php and change them according to your needs. | |
// Combine Event Manager with "Divi – Filterable Blog Module" by changing the $query_args | |
// If you use it like this, the sorting starts with the current event and past events will be hidden automatically | |
add_filter( 'dfbm_query_args_output', function( $query_args ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this snippet to your themes "functions.php" to order the projects by title | |
add_action( 'parse_query', function( $vars ) | |
{ | |
if ( 'project' == $vars->query['post_type'] ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add layouts to the Divi library and get the ID from the corresponding URL | |
// To get your results, you can add a shortcode to text fields as follows: [divi-layout id="7"] | |
add_shortcode( 'divi-layout', function( $atts ) | |
{ | |
$atts = shortcode_atts( [ 'id' => '', ], $atts ); |
OlderNewer