Remove Homepage From Breadcrumb in Lazyest Gallery Plugin

PURPOSE: Remove the link to your home page from the breadcrumb in the “Lazyest Gallery” WordPress Plugin by Macbrink.

This is useful if your gallery is not on your home page. With the default Lazyest Gallery breadcrumb, your visitors may end up clicking on that home page link, and thus be directed away from your gallery. This may annoy those visitors who want to stay in the gallery. With this code, the first link in your gallery breadcrumb will be the gallery page, not the homepage of your website.

Here I am altering a core file of the “Lazyest Gallery” Plugin by Macbrink.

The plugin file and lines to edit are:

File: wp-content/plugins/lazyest-gallery/inc/frontend.php
Lines: 864 – 871

The original lines 864 – 871 look like this:

$navigator = sprintf( '<div class="top_navigator">%s <a href="%s">%s</a> <span class="raquo">%s</span> <a href="%s">%s</a>',
      $now_viewing,
      get_bloginfo( 'url' ), 
      get_bloginfo( 'name' ),
      $sep,
      $this->uri(),
      get_the_title( $post->ID )
    );    

Change those lines into this:

  $navigator = sprintf( '<div class="top_navigator">%s <a href="%s">%s</a>',
      $now_viewing,//stay
 //     get_bloginfo( 'url' ), 
 //     get_bloginfo( 'name' ),
 //     $sep,
      $this->uri(),
      get_the_title( $post->ID )
    );    

NOTE: This code modifies the plugin core. If you do this, keep a change log of your changes. You’ll have to make these changes again after upgrading the Lazyest Gallery plugin to a new version. As always, modifications made to the plugin core will be overridden when you upgrade the plugin. The extra work is worth it to me, for a plugin that does what I want it to do. I keep a simple changelog, and re-doing the changes after an upgrade takes me about 2 minutes.

See more:

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]