Monday 1 July 2013

Reposition Genesis Breadcrumb Easily

Do you want to reposition genesis breadcrumb. Well if you are a blogger and want some unique design for your blog then you would surely like to do so.

Breadcrumbs are just like the menu links but it shows the complete link herichary. It doens't only allows helps with sitelink strutucre but also helps you readers to move to the post category or to homepage. Thus it helps to improve user attentions and your website's page-views.

Thanks to WPVKP for providing this amazing genesis code snippet.

How To Reposition Genesis Breadcrumb


First of all you need to chose the desired position at which you want to place it. Once you do so you can use Genesis visual hook guide plugin to undersand the desired loop.

For example if you want to place it before comment area then it will genesis_before_comments

But before we move any further please take these precautions.
  • Create a backup of your theme's function.php file.
  • Use FTP software and connect it with your hosting.
  • Keep your online file manager open.
Now move to your wordpress dashboard and move to Apperance and then from hover menu select Editor. You can also use cPanel code editor to make live changes.

Now copy the code posted below into your theme's function.pp file ( place it at the bottom ).

// Reposition Genesis Breadcrumbs
remove_action('genesis_before_loop', 'genesis_do_breadcrumbs');
add_action('genesis_before_comments', 'genesis_do_breadcrumbs');

Or if you want to replace it below post content block, then use this snippet. And for more of such
similar links you can visit to official Genesis hooks reference page.

// Replace Your Breadcrumbs To Desired Position
remove_action('genesis_before_loop', 'genesis_do_breadcrumbs');
add_action('genesis_after_post_content', 'genesis_do_breadcrumbs');

That's all. Once you add your snippet simply click on update and refresh your website link. You will see all your changes.

0 comments:

Post a Comment