Skip to main content
added 157 characters in body
Source Link
Brad Dalton
  • 7k
  • 2
  • 36
  • 47

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

if ( function_exists( 'soliloquy' ) ) { 

soliloquy( 'slider', 'slug' ); 

    }

}

This checks to make sure the plugin is active before outputting a function and/or markup otherwise you might get a error like call to undefined function.

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

if ( function_exists( 'soliloquy' ) ) { 

soliloquy( 'slider', 'slug' ); 

    }

}

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

if ( function_exists( 'soliloquy' ) ) { 

soliloquy( 'slider', 'slug' ); 

    }

}

This checks to make sure the plugin is active before outputting a function and/or markup otherwise you might get a error like call to undefined function.

Rollback to Revision 1 - Edit approval overridden by post owner or moderator
Source Link
Brad Dalton
  • 7k
  • 2
  • 36
  • 47

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

    if ( function_exists( 'soliloquy' ) ) { 
         
soliloquy( 'slider', 'slug' );  

    }

}

function_exists should be used after the function name in a theme not before.

add_action('loop_start', 'add_slider');

function add_slider() {

    if ( function_exists('soliloquy') ) { 
        soliloquy('slider', 'slug'); 
    }

}

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

if ( function_exists( 'soliloquy' ) ) { 
 
soliloquy( 'slider', 'slug' );  

    }

}

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

    if ( function_exists( 'soliloquy' ) ) { 
 
        soliloquy( 'slider', 'slug' ); 
 
    }

}

function_exists should be used after the function name in a theme not before.

add_action( 'loop_start', 'add_slider' );

function add_slider() {

if ( function_exists( 'soliloquy' ) ) { 
 
soliloquy( 'slider', 'slug' ); 
 
    }

}

function_exists should be used after the function name in a theme not before.

add_action('loop_start', 'add_slider');

function add_slider() {

    if ( function_exists('soliloquy') ) { 
        soliloquy('slider', 'slug'); 
    }

}
Source Link
Brad Dalton
  • 7k
  • 2
  • 36
  • 47
Loading