Using functions from a plugin in your theme

Yes, you can use functions from plugins in your theme. Please use the function_exists() function to make sure that the function does exit. I used the Breadcrumbs Plus in one of the themes like this:

<?php
if (function_exists('breadcrumbs_plus'))
{
    $breadcrumb_options = array(
            'prefix' => '<div id="breadcrumb">',
            'suffix' => '</div>',
            'title' => 'Du er her: ',
            'home' => 'Forside',
            'sep' => "https://wordpress.stackexchange.com/",
            'front_page' => false,
            'bold' => false,
            'blog' => __('Blog', 'rev'),
            'echo' => true
    );

    breadcrumbs_plus($breadcrumb_options);
}
?>

Leave a Comment