Title: Shouldnt example be different?
Last modified: August 31, 2016

---

# Shouldnt example be different?

 *  Resolved [Austin Gil](https://wordpress.org/support/users/aussng/)
 * (@aussng)
 * [10 years ago](https://wordpress.org/support/topic/shouldnt-example-be-different/)
 * Just found this plugin and saw your usage example:
 * <div class=”breadcrumbs” typeof=”BreadcrumbList” vocab=”[http://schema.org/”&gt](http://schema.org/”&gt);
   
   <?php if(function_exists(‘bcn_display’)) { bcn_display(); }?> </div>
 * But shouldnt the wrapper dive be inside the conditional so that if the plugin
   is not installed, the extra markup wont load? So like:
 * <?php if(function_exists(‘bcn_display’)) : ?>
    <div class=”breadcrumbs” typeof
   =”BreadcrumbList” vocab=”[http://schema.org/”&gt](http://schema.org/”&gt); <?
   php bcn_display(); ?> </div> <?php endif; ?>
 * [https://wordpress.org/plugins/breadcrumb-navxt/](https://wordpress.org/plugins/breadcrumb-navxt/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [10 years ago](https://wordpress.org/support/topic/shouldnt-example-be-different/#post-7400138)
 * Yes, it is more correct to place the if statement around the DIV and the call
   to bcn_display. The current example is used for the shear simplicity and ease
   of reading (the correct way involves a bunch of php tags, making things less 
   clear IMHO).
 *  Thread Starter [Austin Gil](https://wordpress.org/support/users/aussng/)
 * (@aussng)
 * [10 years ago](https://wordpress.org/support/topic/shouldnt-example-be-different/#post-7400139)
 * Right ok. I wasn’t trying to be a dick or anything and call you out on it, I’m
   just a bit anal and wanted to make sure I wasn’t missing another reason it would
   be written like that.
 * I would make one argument though, and that is a lot of people are just going 
   to copy/paste that code. You’re absolutely right that it’s easier to read, but
   might also lead to unnecessary markup in other people’s sites.
 * On another note, this is the first time I am using the plugin and I haven’t gotten
   all the way into it yet, but it looks awesome. I’ve done Yoast breadcrumbs and
   my own, and this looks like a much better solution. Breadcrumbs on custom post
   types that goes back to custom pages has been tough, but if Im not mistaken, 
   this plugin should handle that just fine. If so, I will certainly be using it
   on every project ^_^
 * Thanks for the nice contribution.
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [10 years ago](https://wordpress.org/support/topic/shouldnt-example-be-different/#post-7400169)
 * > Right ok. I wasn’t trying to be a dick or anything and call you out on it…
 * Don’t worry, I didn’t take it that way at all.
 * > You’re absolutely right that it’s easier to read, but might also lead to unnecessary
   > markup in other people’s sites.
 * True, and the method you proposed is much better in the cases where the breadcrumb
   trail is not being displayed on certain pages (e.g. adding calls to one or more
   of the WordPress Conditionals functions).
 *  Thread Starter [Austin Gil](https://wordpress.org/support/users/aussng/)
 * (@aussng)
 * [10 years ago](https://wordpress.org/support/topic/shouldnt-example-be-different/#post-7400170)
 * Right on. Well I got some more experience with the plugin today and it was all
   I hoped it would be. Sending another 5-stars your way.
 * Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shouldnt example be different?’ is closed to new replies.

 * ![](https://ps.w.org/breadcrumb-navxt/assets/icon.svg?rev=1927103)
 * [Breadcrumb NavXT](https://wordpress.org/plugins/breadcrumb-navxt/)
 * [Support Threads](https://wordpress.org/support/plugin/breadcrumb-navxt/)
 * [Active Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breadcrumb-navxt/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Austin Gil](https://wordpress.org/support/users/aussng/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/shouldnt-example-be-different/#post-7400170)
 * Status: resolved